From: Jiri Slaby Date: Wed, 23 Sep 2009 22:57:31 +0000 (-0700) Subject: memstick: move dev_dbg X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b873c2f34ecd4a5a69b41b852cbc365694541c5f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Cc: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index a5b448ea4eab..b3bf1c44d74d 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; } }