]> git.hungrycats.org Git - linux/commit
drm: vc4: Fix possible null pointer dereference
authorAleksandr Mishin <amishin@t-argos.ru>
Tue, 9 Apr 2024 07:56:22 +0000 (10:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:39 +0000 (09:49 +0200)
commit2a345fe928c21de6f3c3c7230ff509d715153a31
treed2c48463df725314784707de7f9d05dcd83153a2
parentb77620730f614059db2470e8ebab3e725280fc6d
drm: vc4: Fix possible null pointer dereference

[ Upstream commit c534b63bede6cb987c2946ed4d0b0013a52c5ba7 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_hdmi.c