Commit 31ab1ad70b25f4e19f6442e8f6d68025ba43b942
Committed by
Guenter Roeck
1 parent
9c09bd8d89
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
hwmon: (ds1621) fix coccinelle warnings
drivers/hwmon/ds1621.c:381:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Showing 1 changed file with 1 additions and 4 deletions Side-by-side Diff
drivers/hwmon/ds1621.c
... | ... | @@ -378,10 +378,7 @@ |
378 | 378 | hwmon_dev = devm_hwmon_device_register_with_groups(&client->dev, |
379 | 379 | client->name, data, |
380 | 380 | ds1621_groups); |
381 | - if (IS_ERR(hwmon_dev)) | |
382 | - return PTR_ERR(hwmon_dev); | |
383 | - | |
384 | - return 0; | |
381 | + return PTR_ERR_OR_ZERO(hwmon_dev); | |
385 | 382 | } |
386 | 383 | |
387 | 384 | static const struct i2c_device_id ds1621_id[] = { |