diff mbox series

[3/3] spi: mt65xx: Don't disguise a "return 0" as "return ret"

Message ID 20230309094704.2568531-4-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series spi: mt65xx: Convert to platform remove callback returning void | expand

Commit Message

Uwe Kleine-König March 9, 2023, 9:47 a.m. UTC
Because of the earlier

	 if (ret)
		return ret;

ret is always zero at the end of mtk_spi_suspend(). Write it as explicit
return 0 for slightly improved clearness.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/spi/spi-mt65xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

AngeloGioacchino Del Regno March 9, 2023, 11:01 a.m. UTC | #1
Il 09/03/23 10:47, Uwe Kleine-König ha scritto:
> Because of the earlier
> 
> 	 if (ret)
> 		return ret;
> 
> ret is always zero at the end of mtk_spi_suspend(). Write it as explicit
> return 0 for slightly improved clearness.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
diff mbox series

Patch

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index f744cb97aa87..2216d4e00c7a 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -1311,7 +1311,7 @@  static int mtk_spi_suspend(struct device *dev)
 		clk_disable_unprepare(mdata->spi_hclk);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int mtk_spi_resume(struct device *dev)