]> Gentwo Git Trees - linux/.git/commit
drm/gma500: Fix null dereference in hdmi teardown
authorZabelin Nikita <n.zabelin@mt-integration.ru>
Thu, 18 Sep 2025 15:06:59 +0000 (18:06 +0300)
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Fri, 19 Sep 2025 10:01:57 +0000 (12:01 +0200)
commit352e66900cde63f3dadb142364d3c35170bbaaff
tree5c2ce4718220327a8e8201cb50d8037d2e36d7ff
parentc7c31f8dc54aa3c9b2c994b5f1ff7e740a654e97
drm/gma500: Fix null dereference in hdmi teardown

pci_set_drvdata sets the value of pdev->driver_data to NULL,
after which the driver_data obtained from the same dev is
dereferenced in oaktrail_hdmi_i2c_exit, and the i2c_dev is
extracted from it. To prevent this, swap these calls.

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

Fixes: 1b082ccf5901 ("gma500: Add Oaktrail support")
Signed-off-by: Zabelin Nikita <n.zabelin@mt-integration.ru>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://lore.kernel.org/r/20250918150703.2562604-1-n.zabelin@mt-integration.ru
drivers/gpu/drm/gma500/oaktrail_hdmi.c