]> git.ipfire.org Git - thirdparty/linux.git/commit
hwmon: (gpd-fan) Fix error handling in gpd_fan_probe()
authorHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Fri, 10 Oct 2025 20:44:46 +0000 (13:44 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 20 Oct 2025 01:56:14 +0000 (18:56 -0700)
commit72ac14851012d45dcbb9d3533e372e33001b873e
treedcbe75fd2589a7d5029c5284f40c84ea9487b2da
parentab0fd09d25e1d706e1ffc240f5cf66dcc89eeb49
hwmon: (gpd-fan) Fix error handling in gpd_fan_probe()

devm_request_region() returns a NULL pointer on error, not an ERR_PTR().
Handle it accordingly.

Also fix error return from the call to devm_hwmon_device_register_with_info().

Fixes: 0ab88e239439 ("hwmon: add GPD devices sensor driver")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Cryolitia PukNgae <cryolitia@uniontech.com>
Link: https://lore.kernel.org/r/20251010204447.94343-1-harshit.m.mogalapalli@oracle.com
[groeck: Updated subject to improve readability]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/gpd-fan.c