video: fbdev: omap2: Use PTR_ERR_OR_ZERO()
PATCH 1/1 video: fbdev: omap2: Use PTR_ERR_OR_ZERO()
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 <[email protected]>
--- drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c +1 -4
@@ -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 */
Signature · 1 line
1.9.1
Quoted 8 lines · Vasyl Gomonovych
Fix
ptr_ret.cocciwarnings:
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c:676:1-3: WARNING:PTR_ERR_OR_ZEROcan be usedUse
PTR_ERR_OR_ZEROrather than if(IS_ERR(...)) +PTR_ERRGenerated by:
scripts/coccinelle/api/ptr_ret.cocciSigned-off-by Vasyl Gomonovych <[email protected]>
Patch queued for 4.16, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics