From: David Lechner <dlechner@baylibre.com>
To: Joshua Crofts <joshua.crofts1@gmail.com>,
Laxman Acharya Padhya <acharyalaxman8848@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Yasin Lee" <yasin.lee.x@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] iio: proximity: hx9023s: validate firmware size
Date: Fri, 10 Jul 2026 10:22:39 -0500 [thread overview]
Message-ID: <f6e95f0e-2e42-41c5-9af4-977a3a945381@baylibre.com> (raw)
In-Reply-To: <20260710165400.00005108@gmail.com>
On 7/10/26 9:54 AM, Joshua Crofts wrote:
> On Fri, 10 Jul 2026 20:07:12 +0545
> Laxman Acharya Padhya <acharyalaxman8848@gmail.com> wrote:
>> @@ -1058,6 +1065,7 @@ static void hx9023s_cfg_update(const struct firmware *fw, void *context)
>> }
>>
>> ret = hx9023s_send_cfg(fw, data);
>> + release_firmware(fw);
>
> Why not move this after the if? Keep the call/retval check coupled.
Because the if branch contains a goto and would therefore skip calling
release_firmware() in case of error.
>
>> if (ret) {
>> dev_warn(dev, "Firmware update failed: %d\n", ret);
>> goto no_fw;
>>
>
> Otherwise this looks good. Feel free to add my tag with the v2:
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
>
next prev parent reply other threads:[~2026-07-10 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 14:22 Laxman Acharya Padhya
2026-07-10 14:54 ` Joshua Crofts
2026-07-10 15:22 ` David Lechner [this message]
2026-07-10 15:21 ` David Lechner
2026-07-10 15:28 ` [PATCH v2] " Laxman Acharya Padhya
2026-07-10 20:21 ` Jonathan Cameron
2026-07-11 9:03 ` Andy Shevchenko
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=f6e95f0e-2e42-41c5-9af4-977a3a945381@baylibre.com \
--to=dlechner@baylibre.com \
--cc=acharyalaxman8848@gmail.com \
--cc=andy@kernel.org \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=stable@vger.kernel.org \
--cc=yasin.lee.x@gmail.com \
/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®