Skip to content
Commit a536019d authored by Shenming Lu's avatar Shenming Lu Committed by Alex Williamson
Browse files

vfio/type1: Remove the almost unused check in vfio_iommu_type1_unpin_pages



The check i > npage at the end of vfio_iommu_type1_unpin_pages is unused
unless npage < 0, but if npage < 0, this function will return npage, which
should return -EINVAL instead. So let's just check the parameter npage at
the start of the function. By the way, replace unpin_exit with break.

Signed-off-by: default avatarShenming Lu <lushenming@huawei.com>
Message-Id: <20210406135009.1707-1-lushenming@huawei.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent f5c858ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment