From: Kean Ren <rh_king@163.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Mark Pearson <mpearson-lenovo@squebb.ca>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Kean Ren <rh_king@163.com>
Subject: Re: [PATCH 2/3] hwmon: lenovo-ec-sensors: Fix NULL pointer dereference when DMI match fails
Date: Wed, 20 May 2026 13:52:05 +0800 [thread overview]
Message-ID: <20260520055205.87493-1-rh_king@163.com> (raw)
In-Reply-To: <58352b37-a87a-49f0-ac89-da226f2266dc@roeck-us.net>
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,
Please review it. Anyway, I will update the next version V3 that will
include all the modify which kindly pointed out from your review.
Thanks,
Kean
next parent reply other threads:[~2026-05-20 5:52 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 [this message]
2026-05-20 13:11 ` Guenter Roeck
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=20260520055205.87493-1-rh_king@163.com \
--to=rh_king@163.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mpearson-lenovo@squebb.ca \
/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®