]> git.baikalelectronics.ru Git - kernel.git/commit
drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
authorYang Yingliang <yangyingliang@huawei.com>
Fri, 22 Apr 2022 03:28:54 +0000 (11:28 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 2 May 2022 21:22:05 +0000 (23:22 +0200)
commit00f6a103a3f01dbd2b1dc72aabe9e3b1aa035681
tree81c4cc51b0370cae84b9364bc5fbd2fd411af1e2
parent9457890ce7acb968f48b960166f7b03dd1e3f850
drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()

It will cause null-ptr-deref in resource_size(), if platform_get_resource()
returns NULL, move calling resource_size() after devm_ioremap_resource() that
will check 'res' to avoid null-ptr-deref.

Fixes: 3efbb4a293a3 ("drm: rockchip: Add basic drm driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220422032854.2995175-1-yangyingliang@huawei.com
drivers/gpu/drm/rockchip/rockchip_drm_vop.c