drm/tegra: dsi: Add missing check for of_find_device_by_node
authorChen Ni <nichen@iscas.ac.cn>
Tue, 24 Oct 2023 08:07:38 +0000 (08:07 +0000)
committerThierry Reding <treding@nvidia.com>
Thu, 14 Dec 2023 17:20:23 +0000 (18:20 +0100)
commitafe6fcb9775882230cd29b529203eabd5d2a638d
treed02eb34f9105e496e53d5d8908d328f176161c2b
parent100035bf8677a57371cb9850fad6faf16a2c0c47
drm/tegra: dsi: Add missing check for of_find_device_by_node

Add check for the return value of of_find_device_by_node() and return
the error if it fails in order to avoid NULL pointer dereference.

Fixes: e94236cde4d5 ("drm/tegra: dsi: Add ganged mode support")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231024080738.825553-1-nichen@iscas.ac.cn
drivers/gpu/drm/tegra/dsi.c