lkml.org 
[lkml]   [2017]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.10 126/129] drm/hisilicon/hibmc: Fix wrong pointer passed to PTR_ERR()
    Date
    4.10-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Wei Yongjun <weiyongjun1@huawei.com>

    commit bdf6f135973acb409b3ec5a6214fb597670a0bc0 upstream.

    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>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Link: http://patchwork.freedesktop.org/patch/msgid/20170112151921.16538-1-weiyj.lk@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- 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 dr

    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;
    }

    \
     
     \ /
      Last update: 2017-05-11 16:20    [W:4.550 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site