From: Dan Carpenter <error27@gmail.com>
To: wenjing.liu@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: break down dc_link.c
Date: Thu, 16 Feb 2023 19:19:04 +0300 [thread overview]
Message-ID: <Y+5XeANydHcGsFiw@kili> (raw)
Hello Wenjing Liu,
This is a semi-automatic email about new static checker warnings.
The patch 54618888d1ea: "drm/amd/display: break down dc_link.c" from
Jan 18, 2023, leads to the following Smatch complaint:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:365 dc_link_construct_phy()
warn: variable dereferenced before check 'link->link_enc' (see line 362)
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c
356
357 enc_init_data.transmitter =
358 translate_encoder_to_transmitter(enc_init_data.encoder);
359 link->link_enc =
360 link->dc->res_pool->funcs->link_enc_create(dc_ctx, &enc_init_data);
361
362 DC_LOG_DC("BIOS object table - DP_IS_USB_C: %d", link->link_enc->features.flags.bits.DP_IS_USB_C);
^^^^^^^^^^^^^^^^
Dereference
363 DC_LOG_DC("BIOS object table - IS_DP2_CAPABLE: %d", link->link_enc->features.flags.bits.IS_DP2_CAPABLE);
^^^^^^^^^^^^^^^^
364
365 if (!link->link_enc) {
^^^^^^^^^^^^^^
Checked too late
366 DC_ERROR("Failed to create link encoder!\n");
367 goto link_enc_create_fail;
368 }
369
regards,
dan carpenter
reply other threads:[~2023-02-16 16:40 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=Y+5XeANydHcGsFiw@kili \
--to=error27@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox