git: 72621b543e98 - main - linuxkpi: Fix style for dma_map_sgtable

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Tue, 06 Dec 2022 15:52:59 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=72621b543e984a2074e1945adc26b49ac04af7e8

commit 72621b543e984a2074e1945adc26b49ac04af7e8
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-12-06 15:52:16 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-12-06 15:52:16 +0000

    linuxkpi: Fix style for dma_map_sgtable
    
    Reported by:    bz
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
---
 sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
index 7f2579787b4b..01395cc7a0d5 100644
--- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
@@ -361,15 +361,13 @@ dma_map_sgtable(struct device *dev, struct sg_table *sgt,
     enum dma_data_direction dir,
     unsigned long attrs)
 {
+	int nents;
 
-	int nents = dma_map_sg_attrs(dev, sgt->sgl, sgt->nents, dir, attrs);
-
-	if (nents < 0) {
-		return nents;
-	} else {
-		sgt->nents = nents;
-		return 0;
-	}
+	nents = dma_map_sg_attrs(dev, sgt->sgl, sgt->nents, dir, attrs);
+	if (nents < 0)
+		return (nents);
+	sgt->nents = nents;
+	return (0);
 }
 
 static inline void