From: YueHaibing <yuehaibing@huawei.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Sean Paul <seanpaul@chromium.org>,
"Peter Ujfalusi" <peter.ujfalusi@ti.com>,
Matteo Croce <mcroce@redhat.com>,
"Benoit Parrot" <bparrot@ti.com>
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: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
Date: Fri, 29 Mar 2019 01:41:36 +0000 [thread overview]
Message-ID: <20190329014136.20318-1-yuehaibing@huawei.com> (raw)
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
index e384b95ad857..8287ade5ece0 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
@@ -934,8 +934,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct hdmi_core_data *core)
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
core->base = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(core->base))
- return PTR_ERR(core->base);
-
- return 0;
+ return PTR_ERR_OR_ZERO(core->base);
}
next reply other threads:[~2019-03-29 1:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 1:41 YueHaibing [this message]
2019-03-29 2:05 ` Matteo Croce
2019-03-29 6:57 ` Mukesh Ojha
2019-04-01 10:21 ` Tomi Valkeinen
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=20190329014136.20318-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=airlied@linux.ie \
--cc=bparrot@ti.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcroce@redhat.com \
--cc=peter.ujfalusi@ti.com \
--cc=seanpaul@chromium.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
all inboxes | Powered by JetHome®