[Linux-stm32] [PATCH 2/2] pwm: stm32-lp: Don't check the return code of pwmchip_remove()

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Wed May 5 16:28:43 UTC 2021


pwmchip_remove() always returns 0. Don't use the value to make it
possible to eventually change the function to return void. This is a
good thing as pwmchip_remove() is usually called from a remove function
(mostly for platform devices) and their return value is ignored by the
device core anyhow.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 drivers/pwm/pwm-stm32-lp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c
index 2464f7a24983..58bc75857b80 100644
--- a/drivers/pwm/pwm-stm32-lp.c
+++ b/drivers/pwm/pwm-stm32-lp.c
@@ -224,7 +224,9 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev)
 {
 	struct stm32_pwm_lp *priv = platform_get_drvdata(pdev);
 
-	return pwmchip_remove(&priv->chip);
+	pwmchip_remove(&priv->chip);
+
+	return 0;
 }
 
 static int __maybe_unused stm32_pwm_lp_suspend(struct device *dev)
-- 
2.30.2




More information about the Linux-stm32 mailing list