Bluetooth: Silence warning in btmrvl SDIO driver
authorKulikov Vasiliy <segooon@gmail.com>
Mon, 5 Jul 2010 08:01:22 +0000 (12:01 +0400)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jul 2010 17:39:05 +0000 (10:39 -0700)
Clone checking of ret to simplify the code.

This patch silences a compiler warning:
drivers/bluetooth/btmrvl_sdio.c: In function ‘btmrvl_sdio_verify_fw_download’:
drivers/bluetooth/btmrvl_sdio.c:80: warning: ‘fws1’ may be used uninitialized in this function
drivers/bluetooth/btmrvl_sdio.c:80: note: ‘fws1’ was declared here

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmrvl_sdio.c

index df0773ebd9e4fc4db3ef8d9d897adfd497d2eb31..47f0f917dec915832f13d233247a635211abd477 100644 (file)
@@ -83,10 +83,10 @@ static int btmrvl_sdio_read_fw_status(struct btmrvl_sdio_card *card, u16 *dat)
        *dat = 0;
 
        fws0 = sdio_readb(card->func, CARD_FW_STATUS0_REG, &ret);
+       if (ret)
+               return -EIO;
 
-       if (!ret)
-               fws1 = sdio_readb(card->func, CARD_FW_STATUS1_REG, &ret);
-
+       fws1 = sdio_readb(card->func, CARD_FW_STATUS1_REG, &ret);
        if (ret)
                return -EIO;