fix the following coccicheck warning:
arch/mips/cavium-octeon/executive/cvmx-spi.c:108:5-8: Unneeded variable:
"res".
Signed-off-by: Mingtong Bao <[email protected]>
---
arch/mips/cavium-octeon/executive/cvmx-spi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-spi.c
b/arch/mips/cavium-octeon/executive/cvmx-spi.c
index 1f8b85473677..5906cc551f75 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-spi.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-spi.c
@@ -105,10 +105,9 @@ void cvmx_spi_set_callbacks(cvmx_spi_callbacks_t
*new_callbacks)
int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode, int
timeout,
int num_ports)
{
- int res = -1;
if (!(OCTEON_IS_MODEL(OCTEON_CN38XX) ||
OCTEON_IS_MODEL(OCTEON_CN58XX)))
- return res;
+ return -1;
/* Callback to perform SPI4 reset */
INVOKE_CB(cvmx_spi_callbacks.reset_cb, interface, mode);
@@ -130,7 +129,7 @@ int cvmx_spi_start_interface(int interface,
cvmx_spi_mode_t mode, int timeout,
/* Callback to handle interface coming up */
INVOKE_CB(cvmx_spi_callbacks.interface_up_cb, interface, mode);
- return res;
+ return -1;
}
/*