diff mbox series

[spi,for-5.4,07/14] spi: spi-fsl-dspi: Remove unused initialization of 'ret' in dspi_probe

Message ID 20190818180115.31114-8-olteanv@gmail.com (mailing list archive)
State Accepted
Commit 9b536d3647ee1348860657c239d247364e4374ec
Headers show
Series NXP DSPI driver cleanup | expand

Commit Message

Vladimir Oltean Aug. 18, 2019, 6:01 p.m. UTC
There is no code path for reaching 'return ret;' without it first being
assigned to an error code. Therefore the initialization with 0 is
pointless.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 drivers/spi/spi-fsl-dspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index c07525a9fd34..c5d99f4d5e3d 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -996,7 +996,7 @@  static int dspi_probe(struct platform_device *pdev)
 	const struct regmap_config *regmap_config;
 	void __iomem *base;
 	struct fsl_dspi_platform_data *pdata;
-	int ret = 0, cs_num, bus_num;
+	int ret, cs_num, bus_num;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(struct fsl_dspi));
 	if (!master)