From: kbuild test robot <fengguang.wu@intel.com>
To: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
Lee Jones <lee.jones@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
linux-fbdev@vger.kernel.org
Subject: [PATCH] backlight: pm8941-wled: fix ptr_ret.cocci warnings
Date: Tue, 27 Oct 2015 02:26:11 +0800 [thread overview]
Message-ID: <20151026182611.GA14761@roam> (raw)
In-Reply-To: <201510270209.ZSHdZKp5%fengguang.wu@intel.com>
drivers/video/backlight/pm8941-wled.c:404:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
CC: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
pm8941-wled.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/video/backlight/pm8941-wled.c
+++ b/drivers/video/backlight/pm8941-wled.c
@@ -401,10 +401,7 @@ static int pm8941_wled_probe(struct plat
bl = devm_backlight_device_register(&pdev->dev, wled->name,
&pdev->dev, wled,
&pm8941_wled_ops, &props);
- if (IS_ERR(bl))
- return PTR_ERR(bl);
-
- return 0;
+ return PTR_ERR_OR_ZERO(bl);
};
static const struct of_device_id pm8941_wled_match_table[] = {
next prev parent reply other threads:[~2015-10-26 18:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 18:26 drivers/video/backlight/pm8941-wled.c:404:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2015-10-26 18:26 ` kbuild test robot [this message]
2015-10-26 18:33 ` [PATCH] backlight: pm8941-wled: fix ptr_ret.cocci warnings Bjorn Andersson
2015-10-27 8:39 ` Lee Jones
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=20151026182611.GA14761@roam \
--to=fengguang.wu@intel.com \
--cc=bjorn.andersson@sonymobile.com \
--cc=jingoohan1@gmail.com \
--cc=kbuild-all@01.org \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).