summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell
diff options
context:
space:
mode:
authorTuo Li <islituo@gmail.com>2021-08-03 19:03:05 -0700
committerKalle Valo <kvalo@codeaurora.org>2021-08-21 20:49:20 +0300
commit118934041c5fec6c35bcf903a76783ea2fa302f0 (patch)
tree912a0dc6e1acd982e0c4629bc77011553f7f4578 /drivers/net/wireless/marvell
parent8f86342872e22910eaa319319d25302a847a3f87 (diff)
mwifiex: drop redundant null-pointer check in mwifiex_dnld_cmd_to_fw()
There is no case in which the variable cmd_node->cmd_skb has no ->data, and thus the variable host_cmd is guaranteed to be not NULL. Therefore, the null-pointer check is redundant and can be dropped. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Tuo Li <islituo@gmail.com> Tested-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210804020305.29812-1-islituo@gmail.com
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/cmdevt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
index 3a11342a6bde..171a25742600 100644
--- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
@@ -187,7 +187,7 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
host_cmd = (struct host_cmd_ds_command *) (cmd_node->cmd_skb->data);
/* Sanity test */
- if (host_cmd == NULL || host_cmd->size == 0) {
+ if (host_cmd->size == 0) {
mwifiex_dbg(adapter, ERROR,
"DNLD_CMD: host_cmd is null\t"
"or cmd size is 0, not sending\n");