]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data()
authorIvan Abramov <i.abramov@mt-integration.ru>
Thu, 6 Mar 2025 11:20:45 +0000 (14:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:52 +0000 (14:31 +0200)
commitb14482befdb68082e5e0a67bd12b5e5dbff75c1f
tree470685dbd3f1051392d5620ebe2dab0f1238a4e1
parentc402f184a053c8e7ca325e50f04bbbc1e4fee019
drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data()

[ Upstream commit 9af152dcf1a06f589f44a74da4ad67e365d4db9a ]

Since pci_get_domain_bus_and_slot() can return NULL, add NULL check for
pci_gfx_root in the mid_get_vbt_data().

This change is similar to the checks implemented in mid_get_fuse_settings()
and mid_get_pci_revID(), which were introduced by commit 0cecdd818cd7
("gma500: Final enables for Oaktrail") as "additional minor
bulletproofing".

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: f910b411053f ("gma500: Add the glue to the various BIOS and firmware interfaces")
Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250306112046.17144-1-i.abramov@mt-integration.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/gma500/mid_bios.c