devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kbuild-all-JC7UmRfGjtg@public.gmane.org,
	robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	bdodge-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org,
	joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org,
	medasaro-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org,
	daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	Olimpiu Dejeu <olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org>
Subject: [PATCH] fix ptr_ret.cocci warnings
Date: Fri, 17 Mar 2017 22:48:09 +0800	[thread overview]
Message-ID: <20170317144809.GA103304@lkp-hsx03.lkp.intel.com> (raw)
In-Reply-To: <1489607133-7870-3-git-send-email-olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org>

drivers/video/backlight/arcxcnn_bl.c:183: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: Olimpiu Dejeu <olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

 arcxcnn_bl.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/video/backlight/arcxcnn_bl.c
+++ b/drivers/video/backlight/arcxcnn_bl.c
@@ -180,10 +180,7 @@ static int arcxcnn_backlight_register(st
 
 	lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp,
 				       &arcxcnn_bl_ops, props);
-	if (IS_ERR(lp->bl))
-		return PTR_ERR(lp->bl);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(lp->bl);
 }
 
 static void arcxcnn_parse_dt(struct arcxcnn *lp)
--
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

  parent reply	other threads:[~2017-03-17 14:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 19:45 [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Olimpiu Dejeu
     [not found] ` <1489607133-7870-1-git-send-email-olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org>
2017-03-15 19:45   ` [PATCH v8 2/3] backlight arcxcnn devicetree bindings for ArcticSand Olimpiu Dejeu
     [not found]     ` <1489607133-7870-2-git-send-email-olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org>
2017-04-25  8:17       ` Lee Jones
2017-04-24 15:09   ` [PATCH v8 1/3] backlight arcxcnn add arc to vendor prefix Rob Herring
     [not found]     ` <CAL_JsqJ+=fQ2e752iCHs0dbdrkotuDtKp=2Z2_xnyCtMnxWV8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-24 17:56       ` Olimpiu Dejeu
2017-04-25 16:36         ` Jingoo Han
2017-04-27 12:36           ` Geert Uytterhoeven
     [not found]             ` <CAMuHMdXbKH5hojvj+N8W0h7znw8iAGo1Y1NyFHjrfQ1n0-XQKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-27 17:41               ` Jingoo Han
2017-04-28 15:04                 ` Olimpiu Dejeu
2017-03-15 19:45 ` [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices Olimpiu Dejeu
     [not found]   ` <1489607133-7870-3-git-send-email-olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org>
2017-03-17 14:48     ` kbuild test robot [this message]
     [not found]       ` <20170317144809.GA103304-zqhkPGYYkloFTpe94t1N+dh3ngVCH38I@public.gmane.org>
2017-03-21 14:58         ` [PATCH] fix ptr_ret.cocci warnings Olimpiu Dejeu
     [not found]           ` <CAF-XLWL6KODEkqjN58abz2ieywgZ0BO5enHQJ2jSD5WpX+NSaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-21 15:07             ` Daniel Thompson
2017-04-17 12:57               ` Olimpiu Dejeu
     [not found]                 ` <CAF-XLWL_w3OqafbLzcM=kOkS1nPb0VSCAyDaudQh2UwE4Gw0gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-24 10:57                   ` Lee Jones
2017-04-24 11:26                     ` Daniel Thompson
2017-03-17 14:48     ` [PATCH v8 3/3] backlight arcxcnn add support for ArcticSand devices kbuild test robot

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=20170317144809.GA103304@lkp-hsx03.lkp.intel.com \
    --to=lkp-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=bdodge-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org \
    --cc=daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jingoohan1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
    --cc=kbuild-all-JC7UmRfGjtg@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=medasaro-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org \
    --cc=olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).