mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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>
This commit is contained in:
parent
a54ca77a98
commit
2738b767be
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue