]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/arm-smmu: Fix error checking for ASID and VMID allocation
authorWill Deacon <will.deacon@arm.com>
Tue, 13 Oct 2015 16:51:14 +0000 (17:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:25:54 +0000 (11:25 -0800)
commit2f7368532da8d9df006cd5382d6b923e5b10cafb
treea3c120ac384bb833a70f2268b489ee68f31d0ea0
parentd2d39a3b91628ef5abdf58e83905b173e63d5ecf
iommu/arm-smmu: Fix error checking for ASID and VMID allocation

commit c0733a2cf30c1e7923b6ad4f8df67941502923de upstream.

The bitmap allocator returns an int, which is one of the standard
negative values on failure. Rather than assigning this straight to a
u16 (like we do for the ASID and VMID callers), which means that we
won't detect failure correctly, use an int for the purposes of error
checking.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/arm-smmu-v3.c