linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init()
@ 2019-03-29  1:41 YueHaibing
  2019-03-29  2:05 ` Matteo Croce
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2019-03-29  1:41 UTC (permalink / raw)
  To: Tomi Valkeinen, David Airlie, Daniel Vetter, Sean Paul,
	Peter Ujfalusi, Matteo Croce, Benoit Parrot
  Cc: YueHaibing, dri-devel, linux-kernel, kernel-janitors

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);
 }






^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-01 10:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29  1:41 [PATCH -next] drm/omap: Use PTR_ERR_OR_ZERO in hdmi4_core_init() YueHaibing
2019-03-29  2:05 ` Matteo Croce
2019-03-29  6:57 ` Mukesh Ojha
2019-04-01 10:21 ` Tomi Valkeinen

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).