From: Guenter Roeck <linux@roeck-us.net>
To: Peiwei Hu <jlu.hpw@foxmail.com>
Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org, trivial@kernel.org
Subject: Re: [PATCH] hwmon: add free before exiting xgene_hwmon_probe
Date: Tue, 28 Dec 2021 08:05:18 -0800 [thread overview]
Message-ID: <20211228160518.GA1183124@roeck-us.net> (raw)
In-Reply-To: <tencent_C851C0324431466CBC22D60C5C6AC4A8E808@qq.com>
On Tue, Dec 28, 2021 at 04:59:10PM +0800, Peiwei Hu wrote:
> do kfifo_free(&ctx->async_msg_fifo) before error exiting
> instead of returning directly.
>
Applied, but please reference the driver in the subject line
of future patches.
Guenter
> Signed-off-by: Peiwei Hu <jlu.hpw@foxmail.com>
> ---
> drivers/hwmon/xgene-hwmon.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
> index 30aae8642069..5cde837bfd09 100644
> --- a/drivers/hwmon/xgene-hwmon.c
> +++ b/drivers/hwmon/xgene-hwmon.c
> @@ -659,8 +659,10 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
>
> acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table,
> &pdev->dev);
> - if (!acpi_id)
> - return -EINVAL;
> + if (!acpi_id) {
> + rc = -EINVAL;
> + goto out_mbox_free;
> + }
>
> version = (int)acpi_id->driver_data;
>
prev parent reply other threads:[~2021-12-28 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 8:59 Peiwei Hu
2021-12-28 16:05 ` Guenter Roeck [this message]
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=20211228160518.GA1183124@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=jlu.hpw@foxmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
/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®