All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] drm/msm: Fix error return code in msm_drm_init()
@ 2021-07-05 13:43 ` Wei Li
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Li @ 2021-07-05 13:43 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter,
	Chandan Uddaraju, Sravanthi Kollukuduru, Archit Taneja,
	Rajesh Yadav, Abhinav Kumar
  Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, guohanjun

When it fail to create crtc_event kthread, it just jump to err_msm_uninit,
while the 'ret' is not updated. So assign the return code before that.

Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Li <liwei391@huawei.com>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/msm_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index fe7d17cd35ec..787522f92e63 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -524,6 +524,7 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
 			"crtc_event:%d", priv->event_thread[i].crtc_id);
 		if (IS_ERR(priv->event_thread[i].worker)) {
 			DRM_DEV_ERROR(dev, "failed to create crtc_event kthread\n");
+			ret = PTR_ERR(priv->event_thread[i].worker);
 			goto err_msm_uninit;
 		}
 
-- 
2.25.1


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

* [PATCH RESEND] drm/msm: Fix error return code in msm_drm_init()
@ 2021-07-05 13:43 ` Wei Li
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Li @ 2021-07-05 13:43 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter,
	Chandan Uddaraju, Sravanthi Kollukuduru, Archit Taneja,
	Rajesh Yadav, Abhinav Kumar
  Cc: linux-arm-msm, freedreno, linux-kernel, dri-devel, guohanjun

When it fail to create crtc_event kthread, it just jump to err_msm_uninit,
while the 'ret' is not updated. So assign the return code before that.

Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Li <liwei391@huawei.com>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
 drivers/gpu/drm/msm/msm_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index fe7d17cd35ec..787522f92e63 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -524,6 +524,7 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
 			"crtc_event:%d", priv->event_thread[i].crtc_id);
 		if (IS_ERR(priv->event_thread[i].worker)) {
 			DRM_DEV_ERROR(dev, "failed to create crtc_event kthread\n");
+			ret = PTR_ERR(priv->event_thread[i].worker);
 			goto err_msm_uninit;
 		}
 
-- 
2.25.1


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

end of thread, other threads:[~2021-07-05 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 13:43 [PATCH RESEND] drm/msm: Fix error return code in msm_drm_init() Wei Li
2021-07-05 13:43 ` Wei Li

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.