diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2016-04-07 12:23:23 (GMT) |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-05-02 08:33:37 (GMT) |
commit | 06b5cca5e7f797b8fffa269fa6298a84256c3295 (patch) | |
tree | b9c76031214c98855f5b4d42ba99697d67745d2c /drivers | |
parent | 5674a9baba32dfff9585bd50e604a06bc9b1c2b8 (diff) | |
download | linux-06b5cca5e7f797b8fffa269fa6298a84256c3295.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/card/block.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 8a0147d..9aaf22e 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); } |