mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 18:20:25 +02:00
hwmon: gigabyte_waterforce: Fix locking bug in waterforce_get_status()
Goto 'unlock_and_return' for unlocking before returning on the error
path.
Fixes: d5939a793693 ("hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20240122154952.2851934-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
6613476e22
commit
97aab852c4
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ static int waterforce_get_status(struct waterforce_data *priv)
|
|||
/* Send command for getting status */
|
||||
ret = waterforce_write_expanded(priv, get_status_cmd, GET_STATUS_CMD_LENGTH);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto unlock_and_return;
|
||||
|
||||
ret = wait_for_completion_interruptible_timeout(&priv->status_report_received,
|
||||
msecs_to_jiffies(STATUS_VALIDITY));
|
||||
|
|
|
|||
Loading…
Reference in a new issue