mmc_block: fix probe error cleanup bug
authorJarkko Lavinen <jarkko.lavinen@nokia.com>
Fri, 8 Jan 2010 22:42:59 +0000 (14:42 -0800)
committerArve Hjønnevåg <arve@android.com>
Mon, 8 Feb 2010 23:08:38 +0000 (15:08 -0800)
If mmc_blk_set_blksize() fails mmc_blk_probe() the request queue and its
thread have been set up and they need to be shut down properly before
putting the disk.

Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Cc: <linux-mmc@vger.kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: San Mehat <san@google.com>
drivers/mmc/card/block.c

index 4da37f03a8ed3fdaeaaa7715b60e360f1fff2193..25cc7167fee64d2ac38936d9c39ddf3006e02fbf 100644 (file)
@@ -631,6 +631,7 @@ static int mmc_blk_probe(struct mmc_card *card)
        return 0;
 
  out:
+       mmc_cleanup_queue(&md->queue);
        mmc_blk_put(md);
 
        return err;