9da531bed13e2f40db1d45f58fd30a7ae0d32235
[openwrt/staging/xback.git] /
1 From: Gabor Juhos <j4g8y7@gmail.com>
2 Date: Wed, 23 Apr 2025 21:31:57 +0200
3 Subject: [PATCH] spi: spi-qpic-snand: propagate errors from
4 qcom_spi_block_erase()
5
6 The qcom_spi_block_erase() function returns with error in case of
7 failure. Change the qcom_spi_send_cmdaddr() function to propagate
8 these errors to the callers instead of returning with success.
9
10 Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface")
11 Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
12 Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
13 Reviewed-by: Md Sadre Alam <quic_mdalam@quicinc.com>
14 ---
15 drivers/spi/spi-qpic-snand.c | 3 +--
16 1 file changed, 1 insertion(+), 2 deletions(-)
17
18
19 ---
20 base-commit: 9c32cda43eb78f78c73aee4aa344b777714e259b
21 change-id: 20250422-qpic-snand-propagate-error-9c95811ab811
22
23 Best regards,
24
25 --- a/drivers/spi/spi-qpic-snand.c
26 +++ b/drivers/spi/spi-qpic-snand.c
27 @@ -1307,8 +1307,7 @@ static int qcom_spi_send_cmdaddr(struct
28 snandc->qspi->addr1 = cpu_to_le32(s_op.addr1_reg << 16);
29 snandc->qspi->addr2 = cpu_to_le32(s_op.addr2_reg);
30 snandc->qspi->cmd = cpu_to_le32(cmd);
31 - qcom_spi_block_erase(snandc);
32 - return 0;
33 + return qcom_spi_block_erase(snandc);
34 default:
35 break;
36 }