Skip to content

Commit ab2c8d3

Browse files
Mani-Sadhasivammiquelraynal
authored andcommitted
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 <manivannan.sadhasivam@linaro.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210402150128.29128-5-manivannan.sadhasivam@linaro.org
1 parent 13b8976 commit ab2c8d3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2943,6 +2943,7 @@ static int qcom_nand_host_init_and_register(struct qcom_nand_controller *nandc,
29432943
if (!nandc->bam_txn) {
29442944
dev_err(nandc->dev,
29452945
"failed to allocate bam transaction\n");
2946+
nand_cleanup(chip);
29462947
return -ENOMEM;
29472948
}
29482949
}

0 commit comments

Comments
 (0)