瀏覽代碼

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>
Ulf Hansson 9 年之前
父節點
當前提交
06b5cca5e7
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/mmc/card/block.c

+ 1 - 0
drivers/mmc/card/block.c

@@ -2289,6 +2289,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
  err_kfree:
  err_kfree:
 	kfree(md);
 	kfree(md);
  out:
  out:
+	__clear_bit(devidx, dev_use);
 	return ERR_PTR(ret);
 	return ERR_PTR(ret);
 }
 }