From: Axel Lin Date: Fri, 11 Jul 2014 08:45:37 +0000 (+0800) Subject: hwmon: (max16065) Use PTR_ERR_OR_ZERO X-Git-Tag: v4.14-rc1~7102^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7b30ea500989e1fde0adbe563976d5379fedb59;p=platform%2Fkernel%2Flinux-rpi.git hwmon: (max16065) Use PTR_ERR_OR_ZERO Signed-off-by: Axel Lin Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/max16065.c b/drivers/hwmon/max16065.c index d4efc79..162401a 100644 --- a/drivers/hwmon/max16065.c +++ b/drivers/hwmon/max16065.c @@ -642,10 +642,7 @@ static int max16065_probe(struct i2c_client *client, hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name, data, data->groups); - if (unlikely(IS_ERR(hwmon_dev))) - return PTR_ERR(hwmon_dev); - - return 0; + return PTR_ERR_OR_ZERO(hwmon_dev); } static const struct i2c_device_id max16065_id[] = {