staging: r8188eu: core/rtw_recv.c: clean up nested if statements
authorChang Yu <marcus.yu.56@gmail.com>
Fri, 24 Jun 2022 14:45:26 +0000 (07:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 11:50:30 +0000 (13:50 +0200)
Combine two nested if statements into a single one to fix indentation
issue and improve readability, as suggested by checkpatch.pl

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
Link: https://lore.kernel.org/r/20220624144526.437322-1-marcus.yu.56@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_recv.c

index 6564e82..020bc21 100644 (file)
@@ -166,10 +166,8 @@ int rtw_free_recvframe(struct recv_frame *precvframe, struct __queue *pfree_recv
 
        list_add_tail(&precvframe->list, get_list_head(pfree_recv_queue));
 
-       if (padapter) {
-               if (pfree_recv_queue == &precvpriv->free_recv_queue)
-                               precvpriv->free_recvframe_cnt++;
-       }
+       if (padapter && (pfree_recv_queue == &precvpriv->free_recv_queue))
+               precvpriv->free_recvframe_cnt++;
 
        spin_unlock_bh(&pfree_recv_queue->lock);