From: Dan Carpenter <dan.carpenter@oracle.com>
To: wenjing.liu@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: access hpo dp link encoder only through link resource
Date: Mon, 31 Jan 2022 19:23:11 +0300 [thread overview]
Message-ID: <20220131162311.GA20493@kili> (raw)
Hello Wenjing Liu,
The patch 3d38a5839ea8: "drm/amd/display: access hpo dp link encoder
only through link resource" from Nov 26, 2021, leads to the following
Smatch static checker warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:2961 dc_link_dp_sync_lt_end()
error: NULL dereference inside function dp_disable_link_phy()
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c
2954 bool dc_link_dp_sync_lt_end(struct dc_link *link, bool link_down)
2955 {
2956 /* If input parameter is set, shut down phy.
2957 * Still shouldn't turn off dp_receiver (DPCD:600h)
2958 */
2959 if (link_down == true) {
2960 struct dc_link_settings link_settings = link->cur_link_settings;
--> 2961 dp_disable_link_phy(link, NULL, link->connector_signal);
^^^^
This NULL will lead to an Oops.
2962 if (dp_get_link_encoding_format(&link_settings) == DP_8b_10b_ENCODING)
2963 dp_set_fec_ready(link, NULL, false);
2964 }
2965
2966 link->sync_lt_in_progress = false;
2967 return true;
2968 }
regards,
dan carpenter
reply other threads:[~2022-01-31 16:23 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=20220131162311.GA20493@kili \
--to=dan.carpenter@oracle.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=wenjing.liu@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.