Skip to content

Commit b873c2f

Browse files
jirislabytorvalds
authored andcommitted
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. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alex Dubov <oakad@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3886de9 commit b873c2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/memstick/core/memstick.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ static int h_memstick_read_dev_id(struct memstick_dev *card,
339339
card->id.type = id_reg.type;
340340
card->id.category = id_reg.category;
341341
card->id.class = id_reg.class;
342+
dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
342343
}
343344
complete(&card->mrq_complete);
344-
dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
345345
return -EAGAIN;
346346
}
347347
}

0 commit comments

Comments
 (0)