1
0
Fork 0

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 <ulf.hansson@linaro.org>
hifive-unleashed-5.1
Ulf Hansson 2016-04-07 14:23:23 +02:00
parent 5674a9baba
commit 06b5cca5e7
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}