linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Wrong variable tested
@ 2010-01-03 16:57 Roel Kluin
  2010-01-03 17:44 ` roel kluin
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-01-03 16:57 UTC (permalink / raw)
  To: Marcel Holtmann, linux-bluetooth, Andrew Morton, LKML

The return of the function sdio_readb() was not tested.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/bluetooth/btmrvl_sdio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index f36defa..cac5b5e 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -348,7 +348,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card)
 		for (tries = 0; tries < MAX_POLL_TRIES; tries++) {
 			base0 = sdio_readb(card->func,
 					SQ_READ_BASE_ADDRESS_A0_REG, &ret);
-			if (ret) {
+			if (base0) {
 				BT_ERR("BASE0 register read failed:"
 					" base0 = 0x%04X(%d)."
 					" Terminating download",
@@ -358,7 +358,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card)
 			}
 			base1 = sdio_readb(card->func,
 					SQ_READ_BASE_ADDRESS_A1_REG, &ret);
-			if (ret) {
+			if (base1) {
 				BT_ERR("BASE1 register read failed:"
 					" base1 = 0x%04X(%d)."
 					" Terminating download",

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

* Re: [PATCH] Bluetooth: Wrong variable tested
  2010-01-03 16:57 [PATCH] Bluetooth: Wrong variable tested Roel Kluin
@ 2010-01-03 17:44 ` roel kluin
  0 siblings, 0 replies; 2+ messages in thread
From: roel kluin @ 2010-01-03 17:44 UTC (permalink / raw)
  To: Marcel Holtmann, linux-bluetooth, Andrew Morton, LKML

On Sun, Jan 3, 2010 at 5:57 PM, Roel Kluin <roel.kluin@gmail.com> wrote:
> The return of the function sdio_readb() was not tested.

Please ignore, as Joe Perches pointed out it's wrong.

Roel

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

end of thread, other threads:[~2010-01-03 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-03 16:57 [PATCH] Bluetooth: Wrong variable tested Roel Kluin
2010-01-03 17:44 ` roel kluin

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).