From: Guenter Roeck <linux@roeck-us.net>
To: Kean Ren <rh_king@163.com>
Cc: Mark Pearson <mpearson-lenovo@squebb.ca>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] hwmon: lenovo-ec-sensors: Fix NULL pointer dereference when DMI match fails
Date: Wed, 20 May 2026 06:11:31 -0700 [thread overview]
Message-ID: <b64144fe-e753-42fa-bf9b-59835090d465@roeck-us.net> (raw)
In-Reply-To: <20260520055205.87493-1-rh_king@163.com>
On 5/19/26 22:52, Kean Ren wrote:
> Hi Guenter,
>
> Thank you for the review!
>
>>> Remove all five manual release_region() calls that are now handled
>>> automatically, and drop the unnecessary braces on the single-statement
>>> blocks that previously contained them.
>>
>> [Severity: Medium]
>> Is this description accurate? The patch diff shows that only four
>> release_region() calls were removed.
>>
>>> As far as I can see there are only four calls in the code. Description
>>> problem ?
> Yes, you are right, thanks for your point out, I will update it.
>
>>> @@ -541,7 +541,6 @@ static int lenovo_ec_probe(struct platform_device *pdev)
>>> (inb_p(MCHP_EMI0_EC_DATA_BYTE1) != 'C') &&
>>> (inb_p(MCHP_EMI0_EC_DATA_BYTE2) != 'H') &&
>>> (inb_p(MCHP_EMI0_EC_DATA_BYTE3) != 'P')) {
>>> - release_region(IO_REGION_START, IO_REGION_LENGTH);
>>> return -ENODEV;
>>> }
>>
>> [Severity: Medium]
>> This isn't a bug, but could these curly braces be removed? The commit
>> message mentions dropping the unnecessary braces on the single-statement
>> blocks, but they appear to have been left intact here.
>>
>>> Hmm, yes, the description does not match the code changes. Please drop
>>> the now unnecessary {}.
> Thanks, you are right, it is unnecessary {}, I have removed it in the V2 2/2,
I have seen that, but that patch only removes one of the now unnecessary {},
and they should be removed when they were made unnecessary (i.e., in this
patch).
Thanks,
Guenter
next prev parent reply other threads:[~2026-05-20 13:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <58352b37-a87a-49f0-ac89-da226f2266dc@roeck-us.net>
2026-05-20 5:52 ` Kean Ren
2026-05-20 13:11 ` Guenter Roeck [this message]
2026-05-14 1:14 [PATCH 0/3] hwmon: lenovo-ec-sensors: Probe error handling fixes Kean
2026-05-14 1:14 ` [PATCH 2/3] hwmon: lenovo-ec-sensors: Fix NULL pointer dereference when DMI match fails Kean
2026-05-14 1:29 ` Guenter Roeck
2026-05-14 3:25 ` Guenter Roeck
2026-05-15 8:10 ` Kean
2026-05-15 8:48 ` Guenter Roeck
2026-05-15 8:30 ` Kean
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=b64144fe-e753-42fa-bf9b-59835090d465@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=rh_king@163.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®