summaryrefslogtreecommitdiff
path: root/drivers/hwmon/gpd-fan.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-27 08:02:50 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-27 08:02:50 +0100
commit37022410f4a3cc11614626a58cd08bcf8ea529e9 (patch)
tree60e0a996385b1d5865dc5264ff130cf9e852abb4 /drivers/hwmon/gpd-fan.c
parentaad1577ab950d1ad46e0dd0915bfbaf9fa9160e4 (diff)
parentdcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa (diff)
Merge 6.18-rc3 into driver-core-next
We need the driver core fixes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon/gpd-fan.c')
-rw-r--r--drivers/hwmon/gpd-fan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/gpd-fan.c b/drivers/hwmon/gpd-fan.c
index 644dc3ca9df7..321794807e8d 100644
--- a/drivers/hwmon/gpd-fan.c
+++ b/drivers/hwmon/gpd-fan.c
@@ -615,14 +615,14 @@ static int gpd_fan_probe(struct platform_device *pdev)
const struct device *hwdev;
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
- if (IS_ERR(res))
- return dev_err_probe(dev, PTR_ERR(res),
+ if (!res)
+ return dev_err_probe(dev, -EINVAL,
"Failed to get platform resource\n");
region = devm_request_region(dev, res->start,
resource_size(res), DRIVER_NAME);
- if (IS_ERR(region))
- return dev_err_probe(dev, PTR_ERR(region),
+ if (!region)
+ return dev_err_probe(dev, -EBUSY,
"Failed to request region\n");
hwdev = devm_hwmon_device_register_with_info(dev,
@@ -631,7 +631,7 @@ static int gpd_fan_probe(struct platform_device *pdev)
&gpd_fan_chip_info,
NULL);
if (IS_ERR(hwdev))
- return dev_err_probe(dev, PTR_ERR(region),
+ return dev_err_probe(dev, PTR_ERR(hwdev),
"Failed to register hwmon device\n");
return 0;