aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManivannan Sadhasivam <[email protected]>2021-04-02 20:31:28 +0530
committerMiquel Raynal <[email protected]>2021-04-07 10:06:26 +0200
commitab2c8d3ef9b828a1eb1a7d448185bf4242bb0afd (patch)
tree1ef07ffe91a97508bb9c4b9de7d7202937dddda6
parent13b89768275d6ca9764bf91449e4cafe46ba706b (diff)
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: Manivannan Sadhasivam <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
-rw-r--r--drivers/mtd/nand/raw/qcom_nandc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
index b9194680cd3c..1fc5ec1482cb 100644
--- a/drivers/mtd/nand/raw/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
@@ -2943,6 +2943,7 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc,
if (!nandc->bam_txn) {
dev_err(nandc->dev,
"failed to allocate bam transaction\n");
+ nand_cleanup(chip);
return -ENOMEM;
}
}