diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2022-12-06 15:52:16 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2022-12-06 15:52:16 +0000 |
commit | 72621b543e984a2074e1945adc26b49ac04af7e8 (patch) | |
tree | 8505d7e0fdacd6efeee5ca877752d838fddfec6f | |
parent | 4085bde9fa2ea7ebe861a2e4a07312aac00a26fc (diff) |
linuxkpi: Fix style for dma_map_sgtable
Reported by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/dma-mapping.h | 14 |
1 files 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 |