drm/amd/display: fix null pointer deref when plugging in display
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Fri, 8 Oct 2021 20:07:45 +0000 (16:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:15 +0000 (19:16 +0100)
commit5837c23f7ddd6a32866d2f64b6e117ba31e97146
tree00523eef5cdeb1f5b9331aa680aff3ec2ce2f5bb
parentcfc1a472a8d89c0d0bbb3600501eeeebc5ec8039
drm/amd/display: fix null pointer deref when plugging in display

[ Upstream commit 1f3b22e4eb162e0b1d423106a47484943a22a309 ]

[Why&How]
When system boots in headless mode, connecting a 4k display creates a
null pointer dereference due to hubp for a certain plane being null.
Add a condition to check for null hubp before dereferencing it.

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c