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-d99b4f544...@collabora.com/

Regards,
Cristian


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

Reply via email to