summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAkari Tsuyukusa <akkun11.open@gmail.com>2026-06-29 23:59:44 +0900
committerJoerg Roedel <joerg.roedel@amd.com>2026-07-09 10:13:26 +0200
commitaebaa93f3da1572877579c2e15ebf27be2dcc7fb (patch)
tree30906e9089d477e190108cd0c08724e5b46b5267 /tools/perf/scripts/python
parent8cdeaa50eae8dad34885515f62559ee83e7e8dda (diff)
iommu/mediatek-v1: Fix off-by-one in MT2701_LARB_NR_MAX
The mt2701_m4u_in_larb[] array contains 4 (for LARB0 to LARB3) elements, meaning mt2701_m4u_to_larb() can legitimately return 3. The current check `if (larbid >= MT2701_LARB_NR_MAX)` incorrectly rejects valid LARB3 with -EINVAL. Fix this off-by-one error by updating MT2701_LARB_NR_MAX to 4. Note that this does not cause immediate issues with the current mt2701.dtsi and mt7623n.dtsi because it only defines 3 LARBs: mediatek,larbs = <&larb0 &larb1 &larb2>; Thus, larbid never reaches 3 in the existing upstream device tree. Fixes: de78657e16f4 ("iommu/mediatek: Fix NULL pointer dereference when printing dev_name") Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions