From: Lee Jones <lee.jones@linaro.org>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>,
kbuild-all@01.org, linux-kernel@vger.kernel.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: Re: [PATCH] backlight: pm8941-wled: fix ptr_ret.cocci warnings
Date: Tue, 27 Oct 2015 08:39:15 +0000 [thread overview]
Message-ID: <20151027083915.GR597@x1> (raw)
In-Reply-To: <20151026182611.GA14761@roam>
On Tue, 27 Oct 2015, kbuild test robot wrote:
> 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(-)
Applied, thanks.
> --- 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[] = {
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2015-10-27 8:39 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 ` [PATCH] backlight: pm8941-wled: fix ptr_ret.cocci warnings kbuild test robot
2015-10-26 18:33 ` Bjorn Andersson
2015-10-27 8:39 ` Lee Jones [this message]
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=20151027083915.GR597@x1 \
--to=lee.jones@linaro.org \
--cc=bjorn.andersson@sonymobile.com \
--cc=fengguang.wu@intel.com \
--cc=jingoohan1@gmail.com \
--cc=kbuild-all@01.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).