drm: vc4: Fix possible null pointer dereference
authorAleksandr Mishin <amishin@t-argos.ru>
Tue, 9 Apr 2024 07:56:22 +0000 (10:56 +0300)
committerMaxime Ripard <mripard@kernel.org>
Mon, 15 Apr 2024 07:13:10 +0000 (09:13 +0200)
commitc534b63bede6cb987c2946ed4d0b0013a52c5ba7
tree2f02b9c5039bc6165080fdcd0be8a86791c1c357
parentf99885b15b2d230d2d1d75e5e542ecaacd29733f
drm: vc4: Fix possible null pointer dereference

In vc4_hdmi_audio_init() of_get_address() may return
NULL which is later dereferenced. Fix this bug by adding NULL check.

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

Fixes: bb7d78568814 ("drm/vc4: Add HDMI audio support")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240409075622.11783-1-amishin@t-argos.ru
drivers/gpu/drm/vc4/vc4_hdmi.c