* [PATCH -next] drm/omap: omap_display_timings: Use PTR_ERR_OR_ZERO in hdmi5_core_init()
@ 2018-09-11 2:10 YueHaibing
0 siblings, 0 replies; only message in thread
From: YueHaibing @ 2018-09-11 2:10 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie, Sebastian Reichel,
Laurent Pinchart, Andrew F. Davis
Cc: YueHaibing, dri-devel, linux-kernel, kernel-janitors
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/hdmi5_core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
index 02efabc..cadfca8 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
@@ -910,8 +910,5 @@ int hdmi5_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] only message in thread
only message in thread, other threads:[~2018-09-11 2:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 2:10 [PATCH -next] drm/omap: omap_display_timings: Use PTR_ERR_OR_ZERO in hdmi5_core_init() YueHaibing
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).