[PATCH] drm/connector: only call HDMI audio helper plugged cb if non-null

Dmitry Baryshkov dmitry.baryshkov at oss.qualcomm.com
Tue May 27 17:59:01 UTC 2025


On 27/05/2025 20:57, Nicolas Frattaroli wrote:
> On driver remove, sound/soc/codecs/hdmi-codec.c calls the plugged_cb
> with NULL as the callback function and codec_dev, as seen in its
> hdmi_remove function.
> 
> The HDMI audio helper then happily tries calling said null function
> pointer, and produces an Oops as a result.
> 
> Fix this by only executing the callback if fn is non-null. This means
> the .plugged_cb and .plugged_cb_dev members still get appropriately
> cleared.
> 
> Fixes: baf616647fe6 ("drm/connector: implement generic HDMI audio helpers")
> Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
> ---
>   drivers/gpu/drm/display/drm_hdmi_audio_helper.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at oss.qualcomm.com>

-- 
With best wishes
Dmitry


More information about the dri-devel mailing list