From: Heinrich Schuchardt Date: Tue, 17 May 2016 22:30:41 +0000 (+0200) Subject: rsi: eliminate superfluous NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b648d788d7841867eea220904dfb77df35f1e08;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index 40658b62d077..35c14cc3f0d2 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -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);