mmc: check correct variable after kzalloc()
Subsystems (2)
PATCH 1/1 mmc: check correct variable after kzalloc()
There is a typo here so we check "mqrq_cur->packed" instead of "mqrq_prev->packed".
drivers/mmc/card/queue.c +1 -1
@@ -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);
Hi Dan,
Quoted 11 lines · Dan Carpenter
There is a typo here so we check "
mqrq_cur->packed" instead of "mqrq_prev->packed".Signed-off-by Dan Carpenter <[email protected]>drivers/mmc/card/queue.c +0
-0
drivers/mmc/card/queue.c int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card) · line 384
Quoted 8 lines
drivers/mmc/card/queue.c +1
-1@@ -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);
Thanks, this is already fixed via a rebase edit to to the original patch in mmc-next. (Fengguang's 0-day bot caught it.)
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Quoted 15 lines · Chris Ball
Hi Dan,
Quoted 12 lines · Dan Carpenter
There is a typo here so we check "
mqrq_cur->packed" instead of "mqrq_prev->packed".Signed-off-by Dan Carpenter <[email protected]>drivers/mmc/card/queue.c +0
-0@@ -378,7 +378,7 @@ int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card) }
Quoted 11 lines
drivers/mmc/card/queue.c int mmc_packed_init(struct mmc_queue *mq, struct mmc_card *card) · line 384
Quoted 7 lines
drivers/mmc/card/queue.c +1
-1mqrq_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);Thanks, this is already fixed via a rebase edit to to the original patch in mmc-next. (Fengguang's 0-day bot caught it.)
Ah, grand. We try to avoid duplicates but there is a gap in our system...
regards,
dan carpenter