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

Commit 96bf8836 authored by Sahitya Tummala's avatar Sahitya Tummala Committed by Subhash Jadavani
Browse files

mmc: block: Fix error path of mmc_blk_alloc_req()



In case of any error within mmc_blk_alloc_req(), the bitmaps
that keep track of devices are not getting cleared. This may
result in failure to detect a card in case it reaches maximum
devices limitation. Fix it by clearing those bitmaps appropriately.

CRs-fixed: 563264
Change-Id: I0e23c45856355565534146f5fabb957fd4b1d007
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent 5355845e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2810,8 +2810,11 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
 err_putdisk:
	put_disk(md->disk);
 err_kfree:
	if (!subname)
		__clear_bit(md->name_idx, name_use);
	kfree(md);
 out:
	__clear_bit(devidx, dev_use);
	return ERR_PTR(ret);
}