mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
drm/amd/display: Fix a NULL pointer dereference in dcn20_hwseq.c
[why] hws->funcs.dccg_init is accessed without checking if it is NULL, which may lead to a NULL pointer dereference. [how] Add a NULL check before calling dccg_init. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e121ccca8a
commit
9d6bd60695
|
|
@ -3140,7 +3140,8 @@ void dcn20_fpga_init_hw(struct dc *dc)
|
|||
|
||||
dcn10_hubbub_global_timer_enable(dc->res_pool->hubbub, true, 2);
|
||||
|
||||
hws->funcs.dccg_init(hws);
|
||||
if (hws->funcs.dccg_init)
|
||||
hws->funcs.dccg_init(hws);
|
||||
|
||||
if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->refclk_setup)
|
||||
dc->res_pool->dccg->funcs->refclk_setup(dc->res_pool->dccg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user