All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: hwmon: fix ptr_ret.cocci warnings
@ 2017-01-10  5:49 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages 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] 3+ messages in thread

* [PATCH] drivers: hwmon: fix ptr_ret.cocci warnings
@ 2017-01-10  5:49 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2017-01-10  5:49 UTC (permalink / raw)
  To: Jaghathiswari Rankappagounder Natarajan
  Cc: openbmc-uLR06cmDAlY/bJ5BZ2RsiQ, joel-U3u1mxZcP9KHXe+LvDLADg,
	jdelvare-IBi9RG/b67k, linux-0h96xk9xTtrk1uMJSBkQmQ,
	linux-hwmon-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, corbet-T1hC0tSOHrs,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
	kbuild-all-JC7UmRfGjtg

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-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

 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[] = {
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] drivers: hwmon: fix ptr_ret.cocci warnings
@ 2017-01-10  5:49 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages 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] 3+ messages in thread

end of thread, other threads:[~2017-01-10  5:49 UTC | newest]

Thread overview: 3+ messages (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
2017-01-10  5:49 ` Julia Lawall
2017-01-10  5:49 ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.