* [PATCH -next] drm/omap: dss: Use PTR_ERR_OR_ZERO in hdmi_audio_register()
@ 2018-09-11 2:15 ` YueHaibing
0 siblings, 0 replies; 2+ messages in thread
From: YueHaibing @ 2018-09-11 2:15 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie, Laurent Pinchart,
Sebastian Reichel, Hans Verkuil
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/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);
}
/* -----------------------------------------------------------------------------
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH -next] drm/omap: dss: Use PTR_ERR_OR_ZERO in hdmi_audio_register()
@ 2018-09-11 2:15 ` YueHaibing
0 siblings, 0 replies; 2+ messages in thread
From: YueHaibing @ 2018-09-11 2:15 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie, Laurent Pinchart,
Sebastian Reichel, Hans Verkuil
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/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);
}
/* -----------------------------------------------------------------------------
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-11 2:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 2:15 [PATCH -next] drm/omap: dss: Use PTR_ERR_OR_ZERO in hdmi_audio_register() YueHaibing
2018-09-11 2:15 ` YueHaibing
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.