summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/asus_atk0110.c
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-11 14:03:37 +0200
committerGuenter Roeck <linux@roeck-us.net>2018-10-11 05:37:13 +0200
commit2738b767be548d6397a74141c18182fddd8abfc3 (patch)
treef8c41cb1d3ff3d2c896a38da8562d1a215bc3367 /drivers/hwmon/asus_atk0110.c
parenthwmon: (lm75) Add MAX31725/6 support (diff)
downloadlinux-2738b767be548d6397a74141c18182fddd8abfc3.tar.xz
linux-2738b767be548d6397a74141c18182fddd8abfc3.zip
hwmon: (asus_atk0110) Use PTR_ERR_OR_ZERO instead of reimplementing its function
PTR_ERR_OR_ZERO has implemented the same function. We prefer to use inlined function rather than code-opened implementation. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/asus_atk0110.c')
-rw-r--r--drivers/hwmon/asus_atk0110.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index a6636fe42189..a7cf00885c5d 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -1210,10 +1210,8 @@ static int atk_register_hwmon(struct atk_data *data)
data->hwmon_dev = hwmon_device_register_with_groups(dev, "atk0110",
data,
data->attr_groups);
- if (IS_ERR(data->hwmon_dev))
- return PTR_ERR(data->hwmon_dev);
- return 0;
+ return PTR_ERR_OR_ZERO(data->hwmon_dev);
}
static int atk_probe_if(struct atk_data *data)