Re: [PATCH -next] hwmon: (jc42) Fix missing unlock on error in jc42_write()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 27, 2022 at 02:29:31PM +0800, Yang Yingliang wrote:
> Add the missing unlock before return from function jc42_write()
> in the error handling case.
> 
> Fixes: 37dedaee8bc6 ("hwmon: (jc42) Convert register access and caching to regmap/regcache")
> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>

Excellent catch. Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/jc42.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
> index 0554b41c32bc..6593d81cb901 100644
> --- a/drivers/hwmon/jc42.c
> +++ b/drivers/hwmon/jc42.c
> @@ -350,7 +350,7 @@ static int jc42_write(struct device *dev, enum hwmon_sensor_types type,
>  		ret = regmap_read(data->regmap, JC42_REG_TEMP_CRITICAL,
>  				  &regval);
>  		if (ret)
> -			return ret;
> +			break;
>  
>  		/*
>  		 * JC42.4 compliant chips only support four hysteresis values.



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux