From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] fix ptr_ret.cocci warnings Date: Fri, 17 Mar 2017 22:48:09 +0800 Message-ID: <20170317144809.GA103304@lkp-hsx03.lkp.intel.com> References: <201703172233.osJjGFrP%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1489607133-7870-3-git-send-email-olimpiu-eV7fy4qpoLhpLGFMi4vTTA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@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 List-Id: devicetree@vger.kernel.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 Signed-off-by: Fengguang Wu --- 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