diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index fdd095e1fa52..5f75ab0dfc73 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -252,9 +252,11 @@ resv_iova: lo = iova_pfn(iovad, start); hi = iova_pfn(iovad, end); reserve_iova(iovad, lo, hi); - } else { + } else if (end < start) { /* dma_ranges list should be sorted */ - dev_err(&dev->dev, "Failed to reserve IOVA\n"); + dev_err(&dev->dev, + "Failed to reserve IOVA [%#010llx-%#010llx]\n", + start, end); return -EINVAL; }