From: Aleksa Savic <savicaleksa83@gmail.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: savicaleksa83@gmail.com, dan.carpenter@linaro.org,
kernel-janitors@vger.kernel.org, error27@gmail.com
Subject: Re: [PATCH] hwmon: gigabyte_waterforce: Fix locking bug in waterforce_get_status()
Date: Tue, 23 Jan 2024 21:46:51 +0100 [thread overview]
Message-ID: <9b1d7c15-16a6-478d-975c-5c375f8674fe@gmail.com> (raw)
In-Reply-To: <20240122154952.2851934-1-harshit.m.mogalapalli@oracle.com>
On 2024-01-22 16:49:52 GMT+01:00, Harshit Mogalapalli wrote:
> 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>
> ---
> This is based on static analysis with smatch, only compile tested.
> ---
> drivers/hwmon/gigabyte_waterforce.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/gigabyte_waterforce.c b/drivers/hwmon/gigabyte_waterforce.c
> index 1799377fc2f1..7bccfe2eaa76 100644
> --- a/drivers/hwmon/gigabyte_waterforce.c
> +++ b/drivers/hwmon/gigabyte_waterforce.c
> @@ -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));
Reviewed-by: Aleksa Savic <savicaleksa83@gmail.com>
Thanks,
Aleksa
next prev parent reply other threads:[~2024-01-23 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 15:49 Harshit Mogalapalli
2024-01-23 20:46 ` Aleksa Savic [this message]
2024-01-26 18:40 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b1d7c15-16a6-478d-975c-5c375f8674fe@gmail.com \
--to=savicaleksa83@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®