提交 ab2c8d3e 编写于 作者: M Manivannan Sadhasivam 提交者: Miquel Raynal

mtd: rawnand: qcom: Add missing nand_cleanup() in error path

Add missing nand_cleanup() in the alloc_bam_transaction() error path
to cleanup the resources properly.
Signed-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210402150128.29128-5-manivannan.sadhasivam@linaro.org
上级 13b89768
...@@ -2943,6 +2943,7 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc, ...@@ -2943,6 +2943,7 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc,
if (!nandc->bam_txn) { if (!nandc->bam_txn) {
dev_err(nandc->dev, dev_err(nandc->dev,
"failed to allocate bam transaction\n"); "failed to allocate bam transaction\n");
nand_cleanup(chip);
return -ENOMEM; return -ENOMEM;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册