[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1536632137-50787-1-git-send-email-yuehaibing@huawei.com>
Date: Tue, 11 Sep 2018 02:15:37 +0000
From: YueHaibing <yuehaibing@...wei.com>
To: Tomi Valkeinen <tomi.valkeinen@...com>,
David Airlie <airlied@...ux.ie>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sebastian Reichel <sre@...nel.org>,
Hans Verkuil <hverkuil@...all.nl>
CC: YueHaibing <yuehaibing@...wei.com>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>
Subject: [PATCH -next] drm/omap: dss: Use PTR_ERR_OR_ZERO in hdmi_audio_register()
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/gpu/drm/omapdrm/dss/hdmi4.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
index cf6230e..e35a8ee6 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
@@ -617,10 +617,7 @@ static int hdmi_audio_register(struct omap_hdmi *hdmi)
&hdmi->pdev->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);
}
/* -----------------------------------------------------------------------------
Powered by blists - more mailing lists