Re: [PATCH] drm/display: hdmi: Prevent NULL pointer dereference in sync_scdc()
From: Cristian Ciocaltea
Date: Wed Nov 04 2026 - 08:36:58 EST
Hi,
On 10/2/26 1:26 AM, Cristian Ciocaltea wrote:
> The connector pointer is used to initialize the local variables hdmi and
> dev before the NULL check takes place, leading 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)
>
> Move those initializations after the sanity check to avoid a potential
> NULL pointer dereference.
>
> Fixes: d653818324ed ("drm/display: hdmi: Add HDMI 2.0 scrambling management helpers")
There are a couple of additional fixes on top of this one, which is why I've
sent them together as part of a new series:
https://lore.kernel.org/all/20261104-hdmi-scdc-scramb-fixes-v1-0-16a9bb3d64a6@xxxxxxxxxxxxx/
Thanks,
Cristian