Skip to content

Commit

Permalink
video: fbdev: omap2: Use PTR_ERR_OR_ZERO()
Browse files Browse the repository at this point in the history
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 <gomonovych@gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
  • Loading branch information
Vasyl Gomonovych authored and Bartlomiej Zolnierkiewicz committed Jan 4, 2018
1 parent 8babdcf commit 1c72004
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 1c72004

Please sign in to comment.