]> git.baikalelectronics.ru Git - kernel.git/commit
drm/gma500: Fix wrong pointer passed to PTR_ERR()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 24 Sep 2021 09:40:40 +0000 (17:40 +0800)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 24 Sep 2021 18:11:40 +0000 (20:11 +0200)
commit74bd642d8d7f67828a79a71dde60880ea4425fa7
tree51725111a74b2037c7884a5ecee9ab7baf1ec5ad
parent222c32e78f35240daf54cc4072a6fd18ea513220
drm/gma500: Fix wrong pointer passed to PTR_ERR()

PTR_ERR() should access the value just tested by IS_ERR(),
otherwise the wrong error code will be returned.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 98b74fdaa450 ("drm/gma500: Embed struct drm_device in struct drm_psb_private")
Reported-by: Hulk Robot <hulkci@huawei.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210924094040.3631675-1-yangyingliang@huawei.com
drivers/gpu/drm/gma500/psb_drv.c