Skip to contentSkip to conversation

memstick: move dev_dbg

PATCH New Jiri Slaby 1 participant 1 message Aug 22, 2009 Sony memorystick

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 memstick: move dev_dbg

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.

---
 drivers/memstick/core/memstick.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/memstick/core/memstick.c +1 -1
index a5b448e..b3bf1c4 100644
@@ -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;
 	}
 }
Signature · 1 line
1.6.3.3