diff mbox series

mwl8k: assign value when defining variables

Message ID 20210203061625.588-1-samirweng1979@163.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series mwl8k: assign value when defining variables | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

samirweng1979 Feb. 3, 2021, 6:16 a.m. UTC
From: wengjianfeng <wengjianfeng@yulong.com>

define refilled and then assign value to it, which should do
that at the same time.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
---
 drivers/net/wireless/marvell/mwl8k.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Kalle Valo Feb. 8, 2021, 11:19 a.m. UTC | #1
samirweng1979 <samirweng1979@163.com> wrote:

> From: wengjianfeng <wengjianfeng@yulong.com>
> 
> define refilled and then assign value to it, which should do
> that at the same time.
> 
> Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>

Patch applied to wireless-drivers-next.git, thanks.

bb779d476ff7 mwl8k: assign value when defining variables
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
index abf3b02..435ef77 100644
--- a/drivers/net/wireless/marvell/mwl8k.c
+++ b/drivers/net/wireless/marvell/mwl8k.c
@@ -1208,9 +1208,8 @@  static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	struct mwl8k_rx_queue *rxq = priv->rxq + index;
-	int refilled;
+	int refilled = 0;
 
-	refilled = 0;
 	while (rxq->rxd_count < MWL8K_RX_DESCS && limit--) {
 		struct sk_buff *skb;
 		dma_addr_t addr;