* [bug report] drm/amd/display: Add DCN3.1 HDCP support
@ 2021-06-25 11:09 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-06-25 11:09 UTC (permalink / raw)
To: nicholas.kazlauskas, Alex Deucher; +Cc: amd-gfx
Hello Nicholas Kazlauskas,
This is a semi-automatic email about new static checker warnings.
The patch bf62221e9d0e: "drm/amd/display: Add DCN3.1 HDCP support"
from May 19, 2021, leads to the following Smatch complaint:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:474 update_config()
error: we previously assumed 'aconnector->dc_sink' could be null (see line 463)
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c
462
463 if (aconnector->dc_sink != NULL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check for NULL
464 link->mode = mod_hdcp_signal_type_to_operation_mode(aconnector->dc_sink->sink_signal);
465
466 display->controller = CONTROLLER_ID_D0 + config->otg_inst;
467 display->dig_fe = config->dig_fe;
468 link->dig_be = config->dig_be;
469 link->ddc_line = aconnector->dc_link->ddc_hw_inst + 1;
470 display->stream_enc_idx = config->stream_enc_idx;
471 link->link_enc_idx = config->link_enc_idx;
472 link->phy_idx = config->phy_idx;
473 link->hdcp_supported_informational = dc_link_is_hdcp14(aconnector->dc_link,
474 aconnector->dc_sink->sink_signal) ? 1 : 0;
^^^^^^^^^^^^^^^^^^^
Unchecked dereference. Originally there were some #ifdefs here and
that maybe ensured that ->dc_sink was non-NULL? I'm not sure.
475 link->dp.rev = aconnector->dc_link->dpcd_caps.dpcd_rev.raw;
476 link->dp.assr_enabled = config->assr_enabled;
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:[~2021-06-25 11:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-25 11:09 [bug report] drm/amd/display: Add DCN3.1 HDCP support Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox