]> git.itanic.dy.fi Git - linux-stable/commit
iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 19 Dec 2022 18:06:22 +0000 (19:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:48:52 +0000 (11:48 +0100)
commitd766ccadbe85823940a7f4e8a21aa2973250fca6
tree744dcc3166754ed912e01f03cb860d8db5faeae8
parentc929a230c84441e400c32e7b7b4ab763711fb63e
iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe()

commit 142e821f68cf5da79ce722cb9c1323afae30e185 upstream.

A clk, prepared and enabled in mtk_iommu_v1_hw_init(), is not released in
the error handling path of mtk_iommu_v1_probe().

Add the corresponding clk_disable_unprepare(), as already done in the
remove function.

Fixes: b17336c55d89 ("iommu/mediatek: add support for mtk iommu generation one HW")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/593e7b7d97c6e064b29716b091a9d4fd122241fb.1671473163.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/mtk_iommu_v1.c