aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Jullien <franck.jullien@gmail.com>2013-07-24 15:17:48 +0200
committerZhangfei Gao <zhangfei.gao@linaro.org>2013-09-11 16:51:16 +0800
commit0985c965ee348f9394a41068505bb30ab8e8b811 (patch)
treec77175d38e087f3cc10a1659ba555ff64087e074
parent3b7ed5ffde39e38742d36581258cc364721f7050 (diff)
mmc: fix null pointer use in mmc_blk_remove_reqtracking-hilt-sync-3.11-0911integration-3.11hs-support
A previous commit (fdfa20c1631210d0) reordered the shutdown sequence in mmc_blk_remove_req. However, mmc_cleanup_queue is now called before we get the card pointer, and mmc_cleanup_queue sets mq->card to NULL. This patch moves the card pointer assignment before mmc_cleanup_queue. Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/card/block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index cd0b7f4a1ff2..f4a0beac9d36 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -2191,10 +2191,10 @@ static void mmc_blk_remove_req(struct mmc_blk_data *md)
* is freeing the queue that stops new requests
* from being accepted.
*/
+ card = md->queue.card;
mmc_cleanup_queue(&md->queue);
if (md->flags & MMC_BLK_PACKED_CMD)
mmc_packed_clean(&md->queue);
- card = md->queue.card;
if (md->disk->flags & GENHD_FL_UP) {
device_remove_file(disk_to_dev(md->disk), &md->force_ro);
if ((md->area_type & MMC_BLK_DATA_AREA_BOOT) &&