git: 6ff004272a1e - main - Return error code from IOMMU_MAP and fix build.

From: Ruslan Bukin <br_at_FreeBSD.org>
Date: Sat, 07 May 2022 09:25:50 UTC
The branch main has been updated by br:

URL: https://cgit.FreeBSD.org/src/commit/?id=6ff004272a1ebf4c326b2644a9e52e8c74a8254f

commit 6ff004272a1ebf4c326b2644a9e52e8c74a8254f
Author:     Ruslan Bukin <br@FreeBSD.org>
AuthorDate: 2022-05-07 09:24:30 +0000
Commit:     Ruslan Bukin <br@FreeBSD.org>
CommitDate: 2022-05-07 09:24:30 +0000

    Return error code from IOMMU_MAP and fix build.
    
    Sponsored by:   UKRI
---
 sys/arm64/iommu/iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c
index 0fad03c7cd8e..e7f51e8693a1 100644
--- a/sys/arm64/iommu/iommu.c
+++ b/sys/arm64/iommu/iommu.c
@@ -112,7 +112,7 @@ iommu_domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base,
 
 	error = IOMMU_MAP(iommu->dev, iodom, va, ma, size, prot);
 
-	return (0);
+	return (error);
 }
 
 static const struct iommu_domain_map_ops domain_map_ops = {
@@ -299,7 +299,9 @@ iommu_domain_unload(struct iommu_domain *iodom,
     struct iommu_map_entries_tailq *entries, bool cansleep)
 {
 	struct iommu_map_entry *entry, *entry1;
+#ifdef INVARIANTS
 	int error;
+#endif
 
 	TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) {
 		KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0,