mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
drm/rockchip: analogix_dp: Add missing error check for platform_get_resource()
Add missing error check for platform_get_resource() return value to
prevent NULL pointer dereference when memory resource is not available.
Fixes: 718b3bb9c0 ("drm/rockchip: analogix_dp: Expand device data to support multiple edp display")
Cc: stable@vger.kernel.org
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260209033123.1089370-1-nichen@iscas.ac.cn
This commit is contained in:
parent
9fc0da8191
commit
45895f4d4d
|
|
@ -461,6 +461,8 @@ static int rockchip_dp_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
i = 0;
|
||||
while (dp_data[i].reg) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user