From: Manivannan Sadhasivam Date: Sat, 5 Aug 2023 17:41:45 +0000 (+0530) Subject: mtd: rawnand: qcom: Do not override the error no of submit_descs() X-Git-Tag: v6.6.17~4011^2^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dcd1e618b6cb59b87eedcbaae184dfa982689b01;p=platform%2Fkernel%2Flinux-rpi.git mtd: rawnand: qcom: Do not override the error no of submit_descs() Just use the error no returned by submit_descs() instead of overriding it with -EIO. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230805174146.57006-10-manivannan.sadhasivam@linaro.org --- diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index f3eeb92..18e3d1e 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -2140,7 +2140,7 @@ static int qcom_nandc_write_oob(struct nand_chip *chip, int page) ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure to write oob\n"); - return -EIO; + return ret; } return nand_prog_page_end_op(chip); @@ -2216,7 +2216,7 @@ static int qcom_nandc_block_markbad(struct nand_chip *chip, loff_t ofs) ret = submit_descs(nandc); if (ret) { dev_err(nandc->dev, "failure to update BBM\n"); - return -EIO; + return ret; } return nand_prog_page_end_op(chip);