All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: amd-gfx@lists.freedesktop.org, "SHANMUGAM,
	SRINIVASAN" <SRINIVASAN.SHANMUGAM@amd.com>
Subject: [bug report] drm/amd/display: Enable DCN6 sources compilation
Date: Mon, 14 Sep 2026 13:30:30 +0300	[thread overview]
Message-ID: <aqfMxsk1sVyVHNKt@stanley.mountain> (raw)

Hello Aurabindo Pillai,

Commit 992694ad2858 ("drm/amd/display: Enable DCN6 sources
compilation") from Jul 21, 2026, leads to the following Smatch
complaint:

    drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c:3500 dce110_enable_tmds_link_output()
    warn: variable dereferenced before check 'link->link_enc' (see line 3490)

drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c
  3489		(void)link_res;
  3490		link->link_enc->funcs->enable_tmds_output(
                ^^^^^^^^^^^^^^^^
The exiting code dereferences link->link_enc

  3491				link->link_enc,
  3492				clock_source,
  3493				color_depth,
  3494				signal,
  3495				pixel_clock);
  3496		link->phy_state.symclk_state = SYMCLK_ON_TX_ON;
  3497	
  3498		// For dongle Type 2 with no I2C support on board, setup sw mode of Ri/Pj check with proper aux instance
  3499		if (link->force_to_use_aux) {
  3500			if (link->link_enc && link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode)
                            ^^^^^^^^^^^^^^

  3501				link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode(link->link_enc,
  3502					link->aux_hw_inst, true);
  3503          } else
  3504                  // For HDMI setup hw mode of Ri/Pj check with proper ddc pin instance
  3505                  if (link->link_enc && link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode)
                            ^^^^^^^^^^^^^^
So these checks don't make sense.

  3506                          link->link_enc->funcs->setup_ri_pj_check_in_sw_or_hw_mode(link->link_enc,
  3507                                  link->ddc_hw_inst, false);
  3508  }


This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

                 reply	other threads:[~2026-09-14 12:47 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=aqfMxsk1sVyVHNKt@stanley.mountain \
    --to=error27@gmail.com \
    --cc=SRINIVASAN.SHANMUGAM@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@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.