mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] memstick: move dev_dbg
@ 2009-08-22 18:53 Jiri Slaby
  0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2009-08-22 18:53 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, Jiri Slaby

id_reg.if_mode might be unitialized when (*mrq)->error is nonzero.
move dev_dbg() inside the if so that we are sure we can use id_reg
values.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
 drivers/memstick/core/memstick.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index a5b448e..b3bf1c4 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -339,9 +339,9 @@ static int h_memstick_read_dev_id(struct memstick_dev *card,
 			card->id.type = id_reg.type;
 			card->id.category = id_reg.category;
 			card->id.class = id_reg.class;
+			dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
 		}
 		complete(&card->mrq_complete);
-		dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
 		return -EAGAIN;
 	}
 }
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-22 18:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-22 18:53 [PATCH 1/1] memstick: move dev_dbg Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®