* [bug report] drm/amd/display: Move link functions from dc to dc_link
@ 2019-05-30 19:25 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-05-30 19:25 UTC (permalink / raw)
To: Chris.Park-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Hello Chris Park,
This is a semi-automatic email about new static checker warnings.
The patch f5692f69f673: "drm/amd/display: Move link functions from dc
to dc_link" from May 10, 2019, leads to the following Smatch
complaint:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2929 dc_link_set_preferred_link_settings()
warn: variable dereferenced before check 'link_stream' (see line 2926)
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c
2911 for (i = 0; i < MAX_PIPES; i++) {
2912 pipe = &dc->current_state->res_ctx.pipe_ctx[i];
2913 if (pipe->stream && pipe->stream->link) {
2914 if (pipe->stream->link == link)
2915 break;
2916 }
2917 }
2918
2919 /* Stream not found */
2920 if (i == MAX_PIPES)
2921 return;
2922
2923 link_stream = link->dc->current_state->res_ctx.pipe_ctx[i].stream;
2924
2925 /* Cannot retrain link if backend is off */
2926 if (link_stream->dpms_off)
^^^^^^^^^^^^^^^^^^^^^
Can link_stream be NULL?
2927 return;
2928
2929 if (link_stream)
^^^^^^^^^^^
We check here so maybe?
2930 decide_link_settings(link_stream, &store_settings);
2931
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-05-30 19:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-30 19:25 [bug report] drm/amd/display: Move link functions from dc to dc_link Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox