[PATCH 0/3] hwmon: lenovo-ec-sensors: Probe error handling fixes

From: Kean

Date: Wed May 13 2026 - 21:14:37 EST


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