[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250316054651.13242-1-sperezglz@gmail.com>
Date: Sat, 15 Mar 2025 23:46:06 -0600
From: Sergio Perez Gonzalez <sperezglz@...il.com>
To: broonie@...nel.org,
skhan@...uxfoundation.org
Cc: linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Sergio Perez Gonzalez <sperezglz@...il.com>
Subject: [PATCH v2] spi: spi-mux: Fix coverity issue, unchecked return value
The return value of spi_setup() is not captured within
spi_mux_select() and it is assumed to be always success.
CID: 1638374
Signed-off-by: Sergio Perez Gonzalez <sperezglz@...il.com>
---
v2: Return spi_setup() directly instead of using ret variable.
---
drivers/spi/spi-mux.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/spi/spi-mux.c b/drivers/spi/spi-mux.c
index c02c4204442f..0eb35c4e3987 100644
--- a/drivers/spi/spi-mux.c
+++ b/drivers/spi/spi-mux.c
@@ -68,9 +68,7 @@ static int spi_mux_select(struct spi_device *spi)
priv->current_cs = spi_get_chipselect(spi, 0);
- spi_setup(priv->spi);
-
- return 0;
+ return spi_setup(priv->spi);
}
static int spi_mux_setup(struct spi_device *spi)
--
2.43.0
Powered by blists - more mailing lists