Commit c56de1e5 authored by Manivannan Sadhasivam's avatar Manivannan Sadhasivam Committed by Miquel Raynal
Browse files

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: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-9-manivannan.sadhasivam@linaro.org
parent bb7a103d
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -2016,15 +2016,14 @@ static int qcom_nandc_write_page(struct nand_chip *chip, const u8 *buf,
	}

	ret = submit_descs(nandc);
	if (ret)
	if (ret) {
		dev_err(nandc->dev, "failure to write page\n");

	if (!ret)
		ret = nand_prog_page_end_op(chip);

		return ret;
	}

	return nand_prog_page_end_op(chip);
}

/* implements ecc->write_page_raw() */
static int qcom_nandc_write_page_raw(struct nand_chip *chip,
				     const u8 *buf, int oob_required,
@@ -2090,15 +2089,14 @@ static int qcom_nandc_write_page_raw(struct nand_chip *chip,
	}

	ret = submit_descs(nandc);
	if (ret)
	if (ret) {
		dev_err(nandc->dev, "failure to write raw page\n");

	if (!ret)
		ret = nand_prog_page_end_op(chip);

		return ret;
	}

	return nand_prog_page_end_op(chip);
}

/*
 * implements ecc->write_oob()
 *