Message ID | tencent_1874B4BE714648459A63EC78424E87226609@qq.com |
---|---|
State | New |
Headers | show |
Series | qtnfmac: fix null check | expand |
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index c68563c83098..e4271405b997 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -1256,7 +1256,7 @@ qtnf_cmd_resp_proc_mac_info(struct qtnf_wmac *mac, sizeof(*mac->macinfo.if_comb), GFP_KERNEL); - if (!mac->macinfo.if_comb) + if (!mac_info->if_comb) return -ENOMEM; return 0;
We did a null check after "mac_info->if_comb = kcalloc(...)", but we checked "mac->macinfo.if_comb" instead of "mac_info->if_comb". Signed-off-by: Weiguo Li <liwg06@foxmail.com> --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)