Bluetooth: btmrvl: fix error return code in btmrvl_sdio_card_to_host()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 5 Jun 2013 02:16:55 +0000 (10:16 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 13 Jun 2013 17:32:28 +0000 (13:32 -0400)
Fix to return -ENOMEM in the skb alloc error handling case
instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/bluetooth/btmrvl_sdio.c

index 13693b7a0d5cf3362cc888919692c1396953b67e..75c262694632255e0932fa387c7e6b9d6e08aa25 100644 (file)
@@ -554,6 +554,7 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
        skb = bt_skb_alloc(num_blocks * blksz + BTSDIO_DMA_ALIGN, GFP_ATOMIC);
        if (skb == NULL) {
                BT_ERR("No free skb");
+               ret = -ENOMEM;
                goto exit;
        }