]> git.ipfire.org Git - people/ms/linux.git/commit
mmc: fix null pointer use in mmc_blk_remove_req
authorFranck Jullien <franck.jullien@gmail.com>
Wed, 24 Jul 2013 13:17:48 +0000 (15:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2013 01:14:32 +0000 (18:14 -0700)
commit4bb5b1a014026ff17f88e0cbb9e21fb6a0869e6d
treec44caa275df7bb46f31a31a3f2d442305be4a19b
parent6f94b7b0a15c04649b67135c7edaaeb591131e8f
mmc: fix null pointer use in mmc_blk_remove_req

commit 8efb83a2f8518a6ffcc074177f8d659c5165ef37 upstream.

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>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/card/block.c