Search Linux Wireless

[PATCH] qtnfmac: fix null check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 drivers/net/wireless/quantenna/qtnfmac/commands.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.25.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux