diff mbox series

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

Message ID 20210505162843.188901-2-u.kleine-koenig@pengutronix.de
State New
Headers show
Series [1/2] pwm: stm32-lp: Don't modify HW state in .remove callback | expand

Commit Message

Uwe Kleine-König May 5, 2021, 4:28 p.m. UTC
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@pengutronix.de>
---
 drivers/pwm/pwm-stm32-lp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

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)