From: Ulf Hansson Date: Thu, 7 Apr 2016 12:23:23 +0000 (+0200) Subject: mmc: block: Release index in partition allocation error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=06b5cca5e7f797b8fffa269fa6298a84256c3295;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mmc: block: Release index in partition allocation error path If the allocation of a new partition fails, let's make sure to also release the previously picked device index. Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 8a0147dfed27..9aaf22e676c4 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -2289,6 +2289,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, err_kfree: kfree(md); out: + __clear_bit(devidx, dev_use); return ERR_PTR(ret); }