[bug report] drm/amd/display: add set and get clock for testing purposes
Dan Carpenter
dan.carpenter at oracle.com
Mon Aug 19 11:51:06 UTC 2019
Hello Charlene Liu,
This is a semi-automatic email about new static checker warnings.
The patch 925f566cb7ae: "drm/amd/display: add set and get clock for
testing purposes" from Jun 27, 2019, leads to the following Smatch
complaint:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:3230 dcn10_set_clock()
error: we previously assumed 'dc->clk_mgr' could be null (see line 3226)
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c
3225
3226 if (dc->clk_mgr && dc->clk_mgr->funcs->get_clock)
^^^^^^^^^^
Check for NULL
3227 dc->clk_mgr->funcs->get_clock(dc->clk_mgr,
3228 context, clock_type, &clock_cfg);
This is indented a bit too far.
3229
3230 if (!dc->clk_mgr->funcs->get_clock)
^^^^^^^^^^^^^
This will oops if ->clk_mgr is NULL
3231 return DC_FAIL_UNSUPPORTED_1;
3232
regards,
dan carpenter
More information about the amd-gfx
mailing list