]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
iommu/arm-smmu-v3: Free MSIs in case of ENOMEM
authorAleksandr Aprelkov <aaprelkov@usergate.com>
Wed, 3 Apr 2024 05:37:59 +0000 (12:37 +0700)
committerWill Deacon <will@kernel.org>
Thu, 18 Apr 2024 14:39:39 +0000 (15:39 +0100)
commit80fea979dd9d48d67c5b48d2f690c5da3e543ebd
treea2b4f35ba53132de050bb66dd960645228319b3e
parentd75d7dc26f29141fe31167c5414605d4087f0abb
iommu/arm-smmu-v3: Free MSIs in case of ENOMEM

If devm_add_action() returns -ENOMEM, then MSIs are allocated but not
not freed on teardown. Use devm_add_action_or_reset() instead to keep
the static analyser happy.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Aleksandr Aprelkov <aaprelkov@usergate.com>
Link: https://lore.kernel.org/r/20240403053759.643164-1-aaprelkov@usergate.com
[will: Tweak commit message, remove warning message]
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c