[PATCH] spi: spi-mem: fix always-true condition in spi_mem_exec_op()
Nikita Yushchenko
nikita.yoush at cogentembedded.com
Tue Feb 15 19:20:27 CET 2022
Indeed fallback to generic implementation if driver's exec_op()
returns -ENOTSUPP.
Signed-off-by: Nikita Yushchenko <nikita.yoush at cogentembedded.com>
---
drivers/spi/spi-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c
index 9c1ede1b61..7f9e65e870 100644
--- a/drivers/spi/spi-mem.c
+++ b/drivers/spi/spi-mem.c
@@ -295,7 +295,7 @@ int spi_mem_exec_op(struct spi_slave *slave, const struct spi_mem_op *op)
* read path) and expect the core to use the regular SPI
* interface in other cases.
*/
- if (!ret || ret != -ENOTSUPP) {
+ if (ret != -ENOTSUPP) {
spi_release_bus(slave);
return ret;
}
--
2.30.2
More information about the U-Boot
mailing list