Merge tag 'linux-kselftest-kunit-5.15-rc1' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-microblaze.git] / arch / ia64 / hp / common / sba_iommu.c
index 9148ddb..8ad6946 100644 (file)
@@ -1459,7 +1459,7 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
                sglist->dma_address = sba_map_page(dev, sg_page(sglist),
                                sglist->offset, sglist->length, dir, attrs);
                if (dma_mapping_error(dev, sglist->dma_address))
-                       return 0;
+                       return -EIO;
                return 1;
        }
 
@@ -1486,7 +1486,7 @@ static int sba_map_sg_attrs(struct device *dev, struct scatterlist *sglist,
        coalesced = sba_coalesce_chunks(ioc, dev, sglist, nents);
        if (coalesced < 0) {
                sba_unmap_sg_attrs(dev, sglist, nents, dir, attrs);
-               return 0;
+               return -ENOMEM;
        }
 
        /*