Commit 72ac1485 authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Guenter Roeck
Browse files

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: 0ab88e23 ("hwmon: add GPD devices sensor driver")
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: default avatarCryolitia 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: default avatarGuenter Roeck <linux@roeck-us.net>
parent ab0fd09d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment