From 61184996a850223492bbd970acb490c12e7e8d11 Mon Sep 17 00:00:00 2001 From: Daniel Mentz Date: Tue, 8 Jul 2025 13:45:48 -0700 Subject: [PATCH] ANDROID: drivers/iommu: Fix return value in iommu_map_sg Probably due to a typo, iommu_map_sg() previously returned EINVAL instead of -EINVAL under certain conditions. Fixes: 1a608d2b0d84 ("BACKPORT: FROMLIST: drivers/iommu: Add deferred map_sg operations") Change-Id: I1458104f6d9c570443014afffa115df98080d9d8 Signed-off-by: Daniel Mentz --- drivers/iommu/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 4c6722803fa4..43011caa2101 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -2722,7 +2722,7 @@ next: consumed = ops->consume_deferred_map_sg(cookie_sg); if (consumed != mapped) { mapped = consumed; - ret = EINVAL; + ret = -EINVAL; goto out_err; } }