* [PATCH] drivers: hwmon: fix ptr_ret.cocci warnings
@ 2017-01-10 5:49 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2017-01-10 5:49 UTC (permalink / raw)
To: Jaghathiswari Rankappagounder Natarajan
Cc: openbmc, joel, jdelvare, linux, linux-hwmon, linux-kernel, corbet,
linux-doc, robh+dt, mark.rutland, devicetree, kbuild-all
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
CC: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
aspeed-pwm-tacho.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/hwmon/aspeed-pwm-tacho.c
+++ b/drivers/hwmon/aspeed-pwm-tacho.c
@@ -855,10 +855,7 @@ static int aspeed_pwm_tacho_probe(struct
hwmon = devm_hwmon_device_register_with_groups(&pdev->dev,
"aspeed_pwm_tacho",
priv, priv->groups);
- if (IS_ERR(hwmon))
- return PTR_ERR(hwmon);
-
- return 0;
+ return PTR_ERR_OR_ZERO(hwmon);
}
static const struct of_device_id of_pwm_tacho_match_table[] = {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-10 5:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 5:49 [PATCH] drivers: hwmon: fix ptr_ret.cocci warnings Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox