From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasyl Gomonovych Date: Wed, 29 Nov 2017 16:22:48 +0000 Subject: [PATCH] video: fbdev: omap2: Use PTR_ERR_OR_ZERO() Message-Id: <1511972570-30240-1-git-send-email-gomonovych@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Vasyl Gomonovych , Tomi Valkeinen , Bartlomiej Zolnierkiewicz , Laurent Pinchart , Mark Brown , linux-kernel@vger.kernel.org Fix ptr_ret.cocci warnings: drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c:676: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 Signed-off-by: Vasyl Gomonovych --- drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c index ec78d61bc551..28de56e21c74 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c @@ -673,10 +673,7 @@ static int hdmi_audio_register(struct device *dev) dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO, &pdata, sizeof(pdata)); - if (IS_ERR(hdmi.audio_pdev)) - return PTR_ERR(hdmi.audio_pdev); - - return 0; + return PTR_ERR_OR_ZERO(hdmi.audio_pdev); } /* HDMI HW IP initialisation */ -- 1.9.1