dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/display: hdmi: Add HDMI 2.0 scrambling management helpers
@ 2026-09-22 11:39 Dan Carpenter
  2026-10-01 22:38 ` Cristian Ciocaltea
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2026-09-22 11:39 UTC (permalink / raw)
  To: Cristian Ciocaltea; +Cc: dri-devel

Hello Cristian Ciocaltea,

Commit d653818324ed ("drm/display: hdmi: Add HDMI 2.0 scrambling
management helpers") from Sep 1, 2026, leads to the following Smatch
complaint:

    drivers/gpu/drm/display/drm_hdmi_helper.c:663 drm_connector_hdmi_sync_scdc()
    warn: variable dereferenced before check 'connector' (see line 657)

drivers/gpu/drm/display/drm_hdmi_helper.c
   656		struct drm_connector_hdmi *hdmi = &connector->hdmi;
   657		struct drm_device *dev = connector->dev;
                                         ^^^^^^^^^^^^^^
Dereference.

   658		struct drm_connector_state *conn_state;
   659		struct drm_crtc *crtc;
   660		u8 config;
   661		int ret;
   662	
   663		if (!connector || !plugged || !ctx)
                     ^^^^^^^^^
Checked too late.

   664			return 0;
   665	

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

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] drm/display: hdmi: Add HDMI 2.0 scrambling management helpers
  2026-09-22 11:39 [bug report] drm/display: hdmi: Add HDMI 2.0 scrambling management helpers Dan Carpenter
@ 2026-10-01 22:38 ` Cristian Ciocaltea
  0 siblings, 0 replies; 2+ messages in thread
From: Cristian Ciocaltea @ 2026-10-01 22:38 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: dri-devel

On 9/22/26 2:39 PM, Dan Carpenter wrote:
> Hello Cristian Ciocaltea,
> 
> Commit d653818324ed ("drm/display: hdmi: Add HDMI 2.0 scrambling
> management helpers") from Sep 1, 2026, leads to the following Smatch
> complaint:
> 
>     drivers/gpu/drm/display/drm_hdmi_helper.c:663 drm_connector_hdmi_sync_scdc()
>     warn: variable dereferenced before check 'connector' (see line 657)
> 
> drivers/gpu/drm/display/drm_hdmi_helper.c
>    656		struct drm_connector_hdmi *hdmi = &connector->hdmi;
>    657		struct drm_device *dev = connector->dev;
>                                          ^^^^^^^^^^^^^^
> Dereference.
> 
>    658		struct drm_connector_state *conn_state;
>    659		struct drm_crtc *crtc;
>    660		u8 config;
>    661		int ret;
>    662	
>    663		if (!connector || !plugged || !ctx)
>                      ^^^^^^^^^
> Checked too late.
> 
>    664			return 0;
>    665	

Hmm, wondering why Sashiko didn't catch this...

I submitted a fix:

https://lore.kernel.org/all/20261002-hdmi-sync-scdc-fix-deref-v1-1-d99b4f544dd4@collabora.com/

Regards,
Cristian


> This email is a free service from the Smatch-CI project [smatch.sf.net].
> 
> regards,
> dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-01 22:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-22 11:39 [bug report] drm/display: hdmi: Add HDMI 2.0 scrambling management helpers Dan Carpenter
2026-10-01 22:38 ` Cristian Ciocaltea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox