[PATCH v2] drm/mediatek: mtk_hdmi: Fix DDC adapter double put in v2

Johan Hovold johan at kernel.org
Sun Jul 5 23:37:29 PDT 2026


On Mon, Jul 06, 2026 at 09:55:07AM +0800, Guangshuo Li wrote:
> mtk_hdmi_common_probe() gets the DDC adapter with
> of_find_i2c_adapter_by_node() and registers a devm action to release the
> adapter device reference with put_device().
> 
> The HDMI v2 remove callback also calls i2c_put_adapter() on the same DDC
> adapter. This is not paired with of_find_i2c_adapter_by_node(): it drops
> the adapter device reference before the devm action drops it again, and
> it also puts a module reference that was never taken.
> 
> Remove the extra i2c_put_adapter() call and drop the now-empty HDMI v2
> remove callback. The common devm action releases the adapter device
> reference.
> 
> Fixes: 8d0f79886273 ("drm/mediatek: Introduce HDMI/DDC v2 for MT8195/MT8188")
> Cc: stable at vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244 at gmail.com>
> ---
> v2:
>   - Drop the empty remove callback, as suggested by Johan Hovold.
>   - Mention that i2c_put_adapter() also drops a module reference that was
>     never taken.
>   - Fix the Fixes tag.
>   - Add Cc stable.

Please remember to CC reviewers:

Reviewed-by: Johan Hovold <johan at kernel.org>



More information about the linux-arm-kernel mailing list