[PATCH 15/15] thermal/drivers/samsung: acpm-tmu: Simplify pm_runtime_resume_and_get() error checks
From: Tudor Ambarus
Date: Mon Oct 26 2026 - 12:06:11 EST
Unlike pm_runtime_get_sync(), pm_runtime_resume_and_get() returns 0 on
success or a negative error code on failure. Check "if (ret)"
consistently across all pm_runtime_resume_and_get() call sites in
acpm-tmu.c.
Signed-off-by: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>
---
drivers/thermal/samsung/acpm-tmu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/thermal/samsung/acpm-tmu.c b/drivers/thermal/samsung/acpm-tmu.c
index bce4674be58e..7c30401f8fc7 100644
--- a/drivers/thermal/samsung/acpm-tmu.c
+++ b/drivers/thermal/samsung/acpm-tmu.c
@@ -161,7 +161,7 @@ static int acpm_tmu_control(struct acpm_tmu_priv *priv, bool on)
int i, ret, err = 0;
ret = pm_runtime_resume_and_get(dev);
- if (ret < 0)
+ if (ret)
return ret;
for (i = 0; i < priv->num_sensors; i++) {
@@ -205,7 +205,7 @@ static int acpm_tmu_get_temp(struct thermal_zone_device *tz, int *temp)
return -ENODATA;
ret = pm_runtime_resume_and_get(dev);
- if (ret < 0)
+ if (ret)
return ret;
scoped_guard(mutex, &sensor->lock) {
@@ -463,7 +463,7 @@ static int acpm_tmu_probe(struct platform_device *pdev)
return dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
ret = pm_runtime_resume_and_get(dev);
- if (ret < 0)
+ if (ret)
return dev_err_probe(dev, ret, "Failed to resume device\n");
ret = acpm_handle->ops->tmu.init(acpm_handle, priv->mbox_chan_id);
--
2.56.0.257.gf7497c7d27-goog