linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bluetooth: btmrvl_sdio: silence warning
@ 2010-07-05  8:01 Kulikov Vasiliy
  2010-07-05  9:24 ` Dan Carpenter
  2010-07-08 21:02 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Kulikov Vasiliy @ 2010-07-05  8:01 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Marcel Holtmann, Bing Zhao, Ben Hutchings,
	André Goddard Rosa, Julia Lawall, linux-bluetooth,
	linux-kernel

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>
---
 drivers/bluetooth/btmrvl_sdio.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index df0773e..47f0f91 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -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;
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-08 21:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-05  8:01 [PATCH] bluetooth: btmrvl_sdio: silence warning Kulikov Vasiliy
2010-07-05  9:24 ` Dan Carpenter
2010-07-08 21:02 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).