diff options
author | Yong Wu <yong.wu@mediatek.com> | 2022-10-18 10:42:55 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-12-05 11:46:02 +0100 |
commit | 26593928564cf5b576ff05d3cbd958f57c9534bb (patch) | |
tree | 1a6f8a1412bd2d2760b2100deabdca3d3194498d /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | b5765a1b44bea9dfcae69c53ffeb4c689d0922a7 (diff) |
iommu/mediatek: Add error path for loop of mm_dts_parse
The mtk_iommu_mm_dts_parse will parse the smi larbs nodes. if the i+1
larb is parsed fail, we should put_device for the i..0 larbs.
There are two places need to comment:
1) The larbid may be not linear mapping, we should loop whole
the array in the error path.
2) I move this line position: "data->larb_imu[id].dev = &plarbdev->dev;"
before "if (!plarbdev->dev.driver)", That means set
data->larb_imu[id].dev before the error path. then we don't need
"platform_device_put(plarbdev)" again in probe_defer case. All depend
on "put_device" of the error path in error cases.
Fixes: d2e9a1102cfc ("iommu/mediatek: Contain MM IOMMU flow with the MM TYPE")
Signed-off-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/20221018024258.19073-4-yong.wu@mediatek.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions