Re: [PATCH] media: platform: mtk-mdp3: fix device leaks at probe

From: AngeloGioacchino Del Regno
Date: Thu Sep 25 2025 - 09:44:38 EST


Il 24/09/25 16:39, Johan Hovold ha scritto:
Make sure to drop the references taken when looking up the subsys
devices during probe on probe failure (e.g. probe deferral) and on
driver unbind.

Similarly, drop the SCP device reference after retrieving its platform
data during probe to avoid leaking it.

Note that holding a reference to a device does not prevent its driver
data from going away.

Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Cc: stable@xxxxxxxxxxxxxxx # 6.1
Cc: Moudy Ho <moudy.ho@xxxxxxxxxxxx>
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>