Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b873c2f3 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds
Browse files

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: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3886de93
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -339,9 +339,9 @@ static int h_memstick_read_dev_id(struct memstick_dev *card,
			card->id.type = id_reg.type;
			card->id.type = id_reg.type;
			card->id.category = id_reg.category;
			card->id.category = id_reg.category;
			card->id.class = id_reg.class;
			card->id.class = id_reg.class;
			dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
		}
		}
		complete(&card->mrq_complete);
		complete(&card->mrq_complete);
		dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
		return -EAGAIN;
		return -EAGAIN;
	}
	}
}
}