drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR()
Subsystems (3)
PATCH 1/1 drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR()
From: Wei Yongjun <[email protected]>
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 <[email protected]>
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c +1 -1
@@ -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; }
Hi Wei,
2017-01-12 Wei Yongjun <[email protected]>:
Quoted 7 lines
From: Wei Yongjun <[email protected]>
PTR_ERRshould access the value just tested byIS_ERR, otherwise the wrong error code will be returned.Fixes d1667b86795a ("drm/hisilicon/hibmc: Add support for frame buffer")Signed-off-by Wei Yongjun <[email protected]>
Reviewed-by Gustavo Padovan <[email protected]>
Gustavo
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel