]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: r8188eu: Remove uninitialized use of ether_type in portctrl()
authorNathan Chancellor <nathan@kernel.org>
Thu, 12 Aug 2021 20:40:26 +0000 (13:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Aug 2021 06:37:19 +0000 (08:37 +0200)
After commit 987219ad34a6 ("staging: r8188eu: remove lines from Makefile
that silence build warnings"), clang warns:

drivers/staging/r8188eu/core/rtw_recv.c:499:8: warning: variable
'ether_type' is uninitialized when used here [-Wuninitialized]
                        if (ether_type == eapol_type)
                            ^~~~~~~~~~
drivers/staging/r8188eu/core/rtw_recv.c:458:16: note: initialize the
variable 'ether_type' to silence this warning
        u16     ether_type;
                          ^
                           = 0
1 warning generated.

This if statement sets the exact same assignment as above so just remove
it.

Acked-by: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210812204027.338872-3-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_recv.c

index 9b3637e490526d085623d0864fe592c1c74a61b7..8df38db9572cf014ced0578f29f254a42266effb 100644 (file)
@@ -495,10 +495,6 @@ static struct recv_frame *portctrl(struct adapter *adapter, struct recv_frame *p
                        /* allowed */
                        /* check decryption status, and decrypt the frame if needed */
                        prtnframe = precv_frame;
-                       /* check is the EAPOL frame or not (Rekey) */
-                       if (ether_type == eapol_type)
-                               /* check Rekey */
-                               prtnframe = precv_frame;
                }
        } else {
                prtnframe = precv_frame;