git: f9a312f61ca2 - stable/13 - linuxkpi: Fix style for dma_map_sgtable

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 02 Feb 2023 11:14:34 UTC
The branch stable/13 has been updated by manu:

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

commit f9a312f61ca2d3349d5d0e89e9306bb817d60548
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-12-06 15:52:16 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-02-02 11:10:36 +0000

    linuxkpi: Fix style for dma_map_sgtable
    
    Reported by:    bz
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    
    (cherry picked from commit 72621b543e984a2074e1945adc26b49ac04af7e8)
---
 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 25e4acf9e45d..afcaa69998b8 100644
--- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
+++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
@@ -357,15 +357,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