From: Dan Carpenter <dan.carpenter@oracle.com>
To: nicholas.kazlauskas@amd.com, Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Add DCN3.1 HDCP support
Date: Fri, 25 Jun 2021 14:09:04 +0300 [thread overview]
Message-ID: <YNW5UHoL19dZhyDM@mwanda> (raw)
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
reply other threads:[~2021-06-25 11:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YNW5UHoL19dZhyDM@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=nicholas.kazlauskas@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.