Re: [PATCH v2] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-08-11 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Aug 11, 2021 at 9:46 AM Tuo Li wrote: > > The variable dc->clk_mgr is checked in: > if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock) > > This indicates dc->clk_mgr can be NULL. > However, it is dereferenced in: > if (!dc->clk_mgr->funcs->get_clock) > > To fi

[PATCH v2] drm/display: fix possible null-pointer dereference in dcn10_set_clock()

2021-08-11 Thread Tuo Li
The variable dc->clk_mgr is checked in: if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock) This indicates dc->clk_mgr can be NULL. However, it is dereferenced in: if (!dc->clk_mgr->funcs->get_clock) To fix this null-pointer dereference, check dc->clk_mgr and the function pointer dc->clk_mgr-