[PATCH] thermal: amlogic: Fix build failure after conversion to .remove_new()

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Sep 28 23:13:05 PDT 2023


Commit 88af8b66ffed ("thermal: amlogic: Convert to platform remove
callback returning void") converted amlogic_thermal_disable() to return
no value but missed that amlogic_thermal_suspend() makes use of the int
returned by this function. As amlogic_thermal_disable() returned zero
unconditionally before, add a return 0 to get the same behaviour as
before the offending commit.

Fixes: 88af8b66ffed ("thermal: amlogic: Convert to platform remove callback returning void")
Reported-by: kernel test robot <lkp at intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309291214.Hjn3gJ94-lkp@intel.com/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
Hello,

sorry for not catching that before sending. I don't understand yet what
was wrong with my testing; I would have bet the series was tested with
an ARCH=arm64 allmodconfig build. :-\

If you prefer it, feel free to squash this patch into the offending
commit.

Best regards, sorry and thanks,
Uwe

 drivers/thermal/amlogic_thermal.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 1426f1eb4ac6..562f63b7bf27 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -300,7 +300,9 @@ static int __maybe_unused amlogic_thermal_suspend(struct device *dev)
 {
 	struct amlogic_thermal *data = dev_get_drvdata(dev);
 
-	return amlogic_thermal_disable(data);
+	amlogic_thermal_disable(data);
+
+	return 0;
 }
 
 static int __maybe_unused amlogic_thermal_resume(struct device *dev)
-- 
2.40.1




More information about the linux-amlogic mailing list