* [PATCH] qtnfmac: fix null check
@ 2022-03-11 13:30 Weiguo Li
2022-03-11 18:04 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Weiguo Li @ 2022-03-11 13:30 UTC (permalink / raw)
To: igor.mitsyanko.os; +Cc: kvalo, geomatsi, linux-wireless
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(-)
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] qtnfmac: fix null check
2022-03-11 13:30 [PATCH] qtnfmac: fix null check Weiguo Li
@ 2022-03-11 18:04 ` Johannes Berg
2022-03-12 4:02 ` Weiguo Li
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2022-03-11 18:04 UTC (permalink / raw)
To: Weiguo Li, igor.mitsyanko.os; +Cc: kvalo, geomatsi, linux-wireless
On Fri, 2022-03-11 at 21:30 +0800, Weiguo Li wrote:
> We did a null check after "mac_info->if_comb = kcalloc(...)", but we checked
> "mac->macinfo.if_comb" instead of "mac_info->if_comb".
Yeah well:
mac_info = &mac->macinfo;
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] qtnfmac: fix null check
2022-03-11 18:04 ` Johannes Berg
@ 2022-03-12 4:02 ` Weiguo Li
0 siblings, 0 replies; 3+ messages in thread
From: Weiguo Li @ 2022-03-12 4:02 UTC (permalink / raw)
To: johannes, imitsyanko; +Cc: kvalo, geomatsi, linux-wireless
On Fri, 11 Mar 2022 19:04:10 +0100, Johannes Berg wrote:
> On Fri, 2022-03-11 at 21:30 +0800, Weiguo Li wrote:
> > We did a null check after "mac_info->if_comb = kcalloc(...)", but we checked
> > "mac->macinfo.if_comb" instead of "mac_info->if_comb".
>
> Yeah well:
>
> mac_info = &mac->macinfo;
>
> johannes
Ha, I didn't notice this... So it's not a problem.
Thanks johannes!
-weiguo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-12 4:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 13:30 [PATCH] qtnfmac: fix null check Weiguo Li
2022-03-11 18:04 ` Johannes Berg
2022-03-12 4:02 ` Weiguo Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.