From: Julia Lawall <julia.lawall@lip6.fr>
To: Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Cc: openbmc@lists.ozlabs.org, joel@jms.id.au, jdelvare@suse.com,
linux@roeck-us.net, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org, corbet@lwn.net,
linux-doc@vger.kernel.org, robh+dt@kernel.org,
mark.rutland@arm.com, devicetree@vger.kernel.org,
kbuild-all@01.org
Subject: [PATCH] drivers: hwmon: fix ptr_ret.cocci warnings
Date: Tue, 10 Jan 2017 06:49:08 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1701100648130.2185@hadrien> (raw)
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[] = {
reply other threads:[~2017-01-10 5:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1701100648130.2185@hadrien \
--to=julia.lawall@lip6.fr \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jaghu@google.com \
--cc=jdelvare@suse.com \
--cc=joel@jms.id.au \
--cc=kbuild-all@01.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox