diff mbox series

thermal: core: remove unnecessary check in trip_point_hyst_store()

Message ID 3332079a-9548-4b19-bba9-69270be115ec@moroto.mountain
State Accepted
Commit 59d894a078cbed0335bb280dca411c91f686a9fd
Headers show
Series thermal: core: remove unnecessary check in trip_point_hyst_store() | expand

Commit Message

Dan Carpenter March 6, 2024, 5:31 a.m. UTC
This code was shuffled around a bit recently.  We no longer need to
check the value of "ret" because we know it's zero.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/thermal/thermal_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki March 6, 2024, 12:27 p.m. UTC | #1
On Wed, Mar 6, 2024 at 6:31 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> This code was shuffled around a bit recently.  We no longer need to
> check the value of "ret" because we know it's zero.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/thermal/thermal_sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
> index 7c02d35384ce..5b533fa40437 100644
> --- a/drivers/thermal/thermal_sysfs.c
> +++ b/drivers/thermal/thermal_sysfs.c
> @@ -181,7 +181,7 @@ trip_point_hyst_store(struct device *dev, struct device_attribute *attr,
>
>         mutex_unlock(&tz->lock);
>
> -       return ret ? ret : count;
> +       return count;
>  }
>
>  static ssize_t
> --

Good catch, applied.

Thanks!
diff mbox series

Patch

diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index 7c02d35384ce..5b533fa40437 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -181,7 +181,7 @@  trip_point_hyst_store(struct device *dev, struct device_attribute *attr,
 
 	mutex_unlock(&tz->lock);
 
-	return ret ? ret : count;
+	return count;
 }
 
 static ssize_t