mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
memory: mtk-smi: fix device leak on larb probe
Make sure to drop the reference taken when looking up the SMI device during larb probe on late probe failure (e.g. probe deferral) and on driver unbind. Fixes:cc8bbe1a83("memory: mediatek: Add SMI driver") Fixes:038ae37c51("memory: mtk-smi: add missing put_device() call in mtk_smi_device_link_common") Cc: stable@vger.kernel.org # 4.6:038ae37c51Cc: stable@vger.kernel.org # 4.6 Cc: Yong Wu <yong.wu@mediatek.com> Cc: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251121164624.13685-3-johan@kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
parent
6cfa038bdd
commit
9dae65913b
1 changed files with 1 additions and 0 deletions
|
|
@ -685,6 +685,7 @@ static void mtk_smi_larb_remove(struct platform_device *pdev)
|
|||
device_link_remove(&pdev->dev, larb->smi_common_dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
component_del(&pdev->dev, &mtk_smi_larb_component_ops);
|
||||
put_device(larb->smi_common_dev);
|
||||
}
|
||||
|
||||
static int __maybe_unused mtk_smi_larb_resume(struct device *dev)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue