summaryrefslogtreecommitdiff
path: root/rust/proc-macro2
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2025-10-20 06:53:11 +0200
committerJoerg Roedel <joerg.roedel@amd.com>2025-11-17 09:49:43 +0100
commit4f2a4aec1cf6f89743cf7acaac6c62eb2f21120b (patch)
tree4c1155cd11741d3f991050e0a630ccb02587d288 /rust/proc-macro2
parentde83d4617f9fe059623e97acf7e1e10d209625b5 (diff)
iommu/mediatek: simplify dt parsing error handling
As previously documented by commit 26593928564c ("iommu/mediatek: Add error path for loop of mm_dts_parse"), the id mapping may not be linear so the whole larb array needs to be iterated on devicetree parsing errors. Simplify the loop by iterating from index zero while dropping the redundant NULL check for consistency with later cleanups. Also add back the comment which was removed by commit 462e768b55a2 ("iommu/mediatek: Fix forever loop in error handling") to prevent anyone from trying to optimise the loop by iterating backwards from 'i'. Cc: Yong Wu <yong.wu@mediatek.com> Acked-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Yong Wu <yong.wu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'rust/proc-macro2')
0 files changed, 0 insertions, 0 deletions