public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] mmc: check correct variable after kzalloc()
@ 2013-02-12 12:24 Dan Carpenter
  2013-02-12 12:27 ` Chris Ball
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-02-12 12:24 UTC (permalink / raw)
  To: Chris Ball
  Cc: Seungwon Jeon, Namjae Jeon, Konstantin Dorfman, Venkatraman S,
	linux-mmc, kbuild, kernel-janitors

There is a typo here so we check "mqrq_cur->packed" instead of
"mqrq_prev->packed".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index c0d1315..97a848b 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card)
 	}
 
 	mqrq_prev->packed = kzalloc(sizeof(struct mmc_packed), GFP_KERNEL);
-	if (!mqrq_cur->packed) {
+	if (!mqrq_prev->packed) {
 		pr_warn("%s: unable to allocate packed cmd for mqrq_prev\n",
 			   mmc_card_name(card));
 		kfree(mqrq_cur->packed);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-12 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 12:24 [patch] mmc: check correct variable after kzalloc() Dan Carpenter
2013-02-12 12:27 ` Chris Ball
2013-02-12 12:35   ` Dan Carpenter

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