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)
committerWill Deacon <will.deacon@arm.com>
Thu, 15 Oct 2015 15:29:47 +0000 (16:29 +0100)
commitc0733a2cf30c1e7923b6ad4f8df67941502923de
treedb477bf821543a6c3da5000a2e531a49a77740fb
parent668b4ada1cdf406dac9f72503fa2f69f31bed0c5
iommu/arm-smmu: Fix error checking for ASID and VMID allocation

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.

Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c