Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06b5cca5 authored by Ulf Hansson's avatar Ulf Hansson
Browse files

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5674a9ba
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
}