Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1557506 > unrolled thread
| Started by | Wei Yongjun <weiyj.lk@gmail.com> |
|---|---|
| First post | 2017-01-12 16:30 +0100 |
| Last post | 2017-01-16 22:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR() Wei Yongjun <weiyj.lk@gmail.com> - 2017-01-12 16:30 +0100
Re: [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR() Gustavo Padovan <gustavo@padovan.org> - 2017-01-16 22:40 +0100
| From | Wei Yongjun <weiyj.lk@gmail.com> |
|---|---|
| Date | 2017-01-12 16:30 +0100 |
| Subject | [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR() |
| Message-ID | <sYPu9-5B2-5@gated-at.bofh.it> |
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;
}
[toc] | [next] | [standalone]
| From | Gustavo Padovan <gustavo@padovan.org> |
|---|---|
| Date | 2017-01-16 22:40 +0100 |
| Subject | Re: [PATCH -next] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR() |
| Message-ID | <t0naq-6mU-9@gated-at.bofh.it> |
| In reply to | #1557506 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web