All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/display: add set and get clock for testing purposes
@ 2019-08-19 11:51 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-08-19 11:51 UTC (permalink / raw)
  To: charlene.liu-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-19 11:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 11:51 [bug report] drm/amd/display: add set and get clock for testing purposes Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.