]> git.ipfire.org Git - people/ms/linux.git/commit
iommu: Do not return error code for APIs with size_t return type
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Mon, 5 Feb 2018 10:45:53 +0000 (05:45 -0500)
committerJoerg Roedel <jroedel@suse.de>
Tue, 13 Feb 2018 18:31:20 +0000 (19:31 +0100)
commitc5611a8751e67595e4e7d3feaff3c900b92094b9
treeb833cce9dd9ad3501f7ba151aadf09faeaa2a6b9
parent7928b2cbe55b2a410a0f5c1f154610059c57b1b2
iommu: Do not return error code for APIs with size_t return type

Currently, iommu_unmap, iommu_unmap_fast and iommu_map_sg return
size_t.  However, some of the return values are error codes (< 0),
which can be misinterpreted as large size. Therefore, returning size 0
instead to signify failure to map/unmap.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c
drivers/iommu/iommu.c
include/linux/iommu.h