rsi: eliminate superfluous NULL check

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>
This commit is contained in:
Heinrich Schuchardt 2016-05-18 00:30:41 +02:00 committed by Kalle Valo
parent d02fb8f14b
commit 9b648d788d
1 changed files with 1 additions and 1 deletions

View 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);