mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] hwmon: lenovo-ec-sensors: Probe error handling fixes
@ 2026-05-14  1:14 Kean
  2026-05-14  1:14 ` [PATCH 1/3] hwmon: lenovo-ec-sensors: Fix EC signature check logic in probe Kean
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Kean @ 2026-05-14  1:14 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Mark Pearson, linux-hwmon, linux-kernel, Kean

This series fixes several bugs in the probe() error handling path of
the lenovo-ec-sensors driver found during code review.

Patch 1 fixes a logic error in the EC signature check where && was
used instead of ||, causing the signature verification to be
effectively bypassed.

Patch 2 adds a missing NULL pointer check for dmi_first_match(),
which can return NULL on unsupported platforms.

Patch 3 converts manual request_region()/release_region() to the
devm-managed variant, fixing a double-release and a resource leak
in the probe error paths.

Kean (3):
  hwmon: lenovo-ec-sensors: Fix EC signature check logic in probe
  hwmon: lenovo-ec-sensors: Fix NULL pointer dereference when DMI match
    fails
  hwmon: lenovo-ec-sensors: Use devm_request_region for automatic
    cleanup

 drivers/hwmon/lenovo-ec-sensors.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2026-05-22  1:33 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-14  1:14 [PATCH 0/3] hwmon: lenovo-ec-sensors: Probe error handling fixes Kean
2026-05-14  1:14 ` [PATCH 1/3] hwmon: lenovo-ec-sensors: Fix EC signature check logic in probe Kean
2026-05-14  1:37   ` Guenter Roeck
2026-05-14  2:40     ` Mark Pearson
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
2026-05-14  1:14 ` [PATCH 3/3] hwmon: lenovo-ec-sensors: Use devm_request_region for automatic cleanup Kean
2026-05-14  1:36   ` Guenter Roeck
2026-05-14  2:39     ` Mark Pearson
2026-05-14  3:24       ` Guenter Roeck
2026-05-20  2:29 ` [PATCH v2 0/2] hwmon: (lenovo-ec-sensors): Fix EC signature validation and I/O resource management Kean Ren
2026-05-20  2:29   ` [PATCH v2 1/2] hwmon: (lenovo-ec-sensors): Convert to devm_request_region() Kean Ren
2026-05-20  2:32 ` [PATCH v2 2/2] hwmon: (lenovo-ec-sensors): Fix EC "MCHP" signature validation logic Kean Ren
2026-05-21  3:52 ` [PATCH v3 0/2] hwmon: (lenovo-ec-sensors): Fix EC signature validation and I/O resource management Kean Ren
2026-05-21  3:52   ` [PATCH v3 1/2] hwmon: (lenovo-ec-sensors): Convert to devm_request_region() Kean Ren
2026-05-21 13:45     ` Guenter Roeck
2026-05-21  3:52   ` [PATCH v3 2/2] hwmon: (lenovo-ec-sensors): Fix EC "MCHP" signature validation logic Kean Ren
2026-05-21 13:46     ` Guenter Roeck
2026-05-22  1:33       ` 任海 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome