]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommufd/iova_bitmap: Consolidate iova_bitmap_set exit conditionals
authorJoao Martins <joao.m.martins@oracle.com>
Thu, 27 Jun 2024 11:01:03 +0000 (12:01 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 28 Jun 2024 16:12:23 +0000 (13:12 -0300)
commit00fa1a89917fbc319909231e648439b26e8857af
tree17eec65c52afcabd92e3f8503df2b363c4efec18
parent781bc08797a2146400332acf2d7706793b51e20f
iommufd/iova_bitmap: Consolidate iova_bitmap_set exit conditionals

There's no need to have two conditionals when they are closely tied
together. Move the setting of bitmap::set_ahead_length after it checks for
::pages array out of bounds access.

Link: https://lore.kernel.org/r/20240627110105.62325-10-joao.m.martins@oracle.com
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Matt Ochs <mochs@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/iova_bitmap.c