lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 6 Mar 2024 13:27:15 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Daniel Lezcano <daniel.lezcano@...aro.org>, 
	Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] thermal: core: remove unnecessary check in trip_point_hyst_store()

On Wed, Mar 6, 2024 at 6:31 AM Dan Carpenter <dan.carpenter@...aro.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@...aro.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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ