* [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR()
@ 2017-01-12 15:19 Wei Yongjun
2017-01-16 21:35 ` Gustavo Padovan
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2017-01-12 15:19 UTC (permalink / raw)
To: Rongrong Zou, Xinwei Kong, Chen Feng, David Airlie
Cc: Wei Yongjun, dri-devel, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
PTR_ERR should access the value just tested by IS_ERR, otherwise
the wrong error code will be returned.
Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
index 7a6957a..16fe790 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
@@ -121,7 +121,7 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
hi_fbdev->fb = hibmc_framebuffer_init(priv->dev, &mode_cmd, gobj);
if (IS_ERR(hi_fbdev->fb)) {
- ret = PTR_ERR(info);
+ ret = PTR_ERR(hi_fbdev->fb);
DRM_ERROR("failed to initialize framebuffer: %d\n", ret);
goto out_release_fbi;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR()
2017-01-12 15:19 [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR() Wei Yongjun
@ 2017-01-16 21:35 ` Gustavo Padovan
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2017-01-16 21:35 UTC (permalink / raw)
To: Wei Yongjun
Cc: Rongrong Zou, Xinwei Kong, Chen Feng, David Airlie, Wei Yongjun,
linux-kernel, dri-devel
Hi Wei,
2017-01-12 Wei Yongjun <weiyj.lk@gmail.com>:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> PTR_ERR should access the value just tested by IS_ERR, otherwise
> the wrong error code will be returned.
>
> Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR()
@ 2017-01-16 21:35 ` Gustavo Padovan
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2017-01-16 21:35 UTC (permalink / raw)
To: Wei Yongjun
Cc: Chen Feng, linux-kernel, dri-devel, Xinwei Kong, Wei Yongjun,
Rongrong Zou
Hi Wei,
2017-01-12 Wei Yongjun <weiyj.lk@gmail.com>:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> PTR_ERR should access the value just tested by IS_ERR, otherwise
> the wrong error code will be returned.
>
> Fixes: d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-16 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 15:19 [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR() Wei Yongjun
2017-01-16 21:35 ` Gustavo Padovan
2017-01-16 21:35 ` Gustavo Padovan
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.