From: YueHaibing <yuehaibing@huawei.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>,
David Airlie <airlied@linux.ie>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sebastian Reichel <sre@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>
Cc: YueHaibing <yuehaibing@huawei.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] drm/omap: dss: Use PTR_ERR_OR_ZERO in hdmi_audio_register()
Date: Tue, 11 Sep 2018 02:15:37 +0000 [thread overview]
Message-ID: <1536632137-50787-1-git-send-email-yuehaibing@huawei.com> (raw)
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@huawei.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);
}
/* -----------------------------------------------------------------------------
reply other threads:[~2018-09-11 2:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1536632137-50787-1-git-send-email-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=hverkuil@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sre@kernel.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).