[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220408135921.16534-1-hanyihao@vivo.com>
Date: Fri, 8 Apr 2022 06:59:11 -0700
From: Yihao Han <hanyihao@...o.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Fabio Aiuto <fabioaiuto83@...il.com>,
Yihao Han <hanyihao@...o.com>,
Lee Jones <lee.jones@...aro.org>,
Xiangyang Zhang <xyz.sun.ok@...il.com>,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Bryan Brattlof <hello@...anbrattlof.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc: kernel@...o.com
Subject: [PATCH v2] staging: rtl8723bs: remove unnecessary `if`
remove a unnecesarry if in `sd_recv_rxfifo`
Suggested-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Yihao Han <hanyihao@...o.com>
---
drivers/staging/rtl8723bs/hal/sdio_ops.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index a545832a468e..107f427ee4aa 100755
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -811,17 +811,14 @@ static struct recv_buf *sd_recv_rxfifo(struct adapter *adapter, u32 size)
SIZE_PTR alignment = 0;
recvbuf->pskb = rtw_skb_alloc(MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
-
- if (recvbuf->pskb) {
- recvbuf->pskb->dev = adapter->pnetdev;
-
- tmpaddr = (SIZE_PTR)recvbuf->pskb->data;
- alignment = tmpaddr & (RECVBUFF_ALIGN_SZ - 1);
- skb_reserve(recvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
- }
-
if (!recvbuf->pskb)
return NULL;
+
+ recvbuf->pskb->dev = adapter->pnetdev;
+
+ tmpaddr = (SIZE_PTR)recvbuf->pskb->data;
+ alignment = tmpaddr & (RECVBUFF_ALIGN_SZ - 1);
+ skb_reserve(recvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
}
/* 3 3. read data from rxfifo */
--
2.17.1
Powered by blists - more mailing lists