Skip to content

Commit c56de1e

Browse files
Mani-Sadhasivammiquelraynal
authored andcommitted
mtd: rawnand: qcom: Simplify the call to nand_prog_page_end_op()
Now that the dma desc cleanup is moved inside submit_descs(), let's simplify the call to nand_prog_page_end_op() inside qcom_nandc_write_page() and qcom_nandc_write_page_raw() to match other functions. 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/20230805174146.57006-9-manivannan.sadhasivam@linaro.org
1 parent bb7a103 commit c56de1e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

drivers/mtd/nand/raw/qcom_nandc.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,13 +2016,12 @@ static int qcom_nandc_write_page(struct nand_chip *chip, const u8 *buf,
20162016
}
20172017

20182018
ret = submit_descs(nandc);
2019-
if (ret)
2019+
if (ret) {
20202020
dev_err(nandc->dev, "failure to write page\n");
2021+
return ret;
2022+
}
20212023

2022-
if (!ret)
2023-
ret = nand_prog_page_end_op(chip);
2024-
2025-
return ret;
2024+
return nand_prog_page_end_op(chip);
20262025
}
20272026

20282027
/* implements ecc->write_page_raw() */
@@ -2090,13 +2089,12 @@ static int qcom_nandc_write_page_raw(struct nand_chip *chip,
20902089
}
20912090

20922091
ret = submit_descs(nandc);
2093-
if (ret)
2092+
if (ret) {
20942093
dev_err(nandc->dev, "failure to write raw page\n");
2094+
return ret;
2095+
}
20952096

2096-
if (!ret)
2097-
ret = nand_prog_page_end_op(chip);
2098-
2099-
return ret;
2097+
return nand_prog_page_end_op(chip);
21002098
}
21012099

21022100
/*

0 commit comments

Comments
 (0)