diff options
| author | Ethan Tidmore <ethantidmore06@gmail.com> | 2026-03-19 13:26:44 -0500 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2026-03-27 19:55:52 +0100 |
| commit | 553a127cb66523089bc10eb54640205495f4bb5b (patch) | |
| tree | da04b9e49bbfcf69f0e202a51046ffa7461c46e0 /tools/perf/scripts/python | |
| parent | b2e5684558edf3e9bbe18d0e0043854994eab1be (diff) | |
iommu/riscv: Fix signedness bug
The function platform_irq_count() returns negative error codes and
iommu->irqs_count is an unsigned integer, so the check
(iommu->irqs_count <= 0) is always impossible.
Make the return value of platform_irq_count() be assigned to ret, check
for error, and then assign iommu->irqs_count to ret.
Detected by Smatch:
drivers/iommu/riscv/iommu-platform.c:119 riscv_iommu_platform_probe() warn:
'iommu->irqs_count' unsigned <= 0
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Fixes: 5c0ebbd3c6c6 ("iommu/riscv: Add RISC-V IOMMU platform device driver")
Reviewed-by: Andrew Jones <andrew.jones@oss.qualcomm.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
