rsi: eliminate superfluous NULL check
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 17 May 2016 22:30:41 +0000 (00:30 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 14 Jun 2016 14:17:58 +0000 (17:17 +0300)
msg is dereferenced before checking against NULL, e.g.
when assigning pad_bytes.
Remove the superfluous check in function rsi_mgmt_pkt_to_core.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_mgmt.c

index 40658b62d07780ea1f1aa39cecf59673ca73c16e..35c14cc3f0d2d6ca006d3a934c33dbd7962fc883 100644 (file)
@@ -398,7 +398,7 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
                        return -ENOLINK;
 
                msg_len -= pad_bytes;
-               if ((msg_len <= 0) || (!msg)) {
+               if (msg_len <= 0) {
                        rsi_dbg(MGMT_RX_ZONE,
                                "%s: Invalid rx msg of len = %d\n",
                                __func__, msg_len);