* [PATCH net-next] net: sunhme: Fix undersized zeroing of quattro->happy_meals
@ 2022-09-28 0:41 Sean Anderson
2022-09-29 2:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Sean Anderson @ 2022-09-28 0:41 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev
Cc: Rolf Eike Beer, Zheyu Ma, Nick Bowler,
Linux Memory Management List, linux-kernel, Sean Anderson,
kernel test robot
Just use kzalloc instead.
Fixes: d6f1e89bdbb8 ("sunhme: Return an ERR_PTR from quattro_pci_find")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
---
drivers/net/ethernet/sun/sunhme.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c
index 3afa73db500c..62deed210a95 100644
--- a/drivers/net/ethernet/sun/sunhme.c
+++ b/drivers/net/ethernet/sun/sunhme.c
@@ -2409,12 +2409,10 @@ static struct quattro *quattro_sbus_find(struct platform_device *child)
if (qp)
return qp;
- qp = kmalloc(sizeof(struct quattro), GFP_KERNEL);
+ qp = kzalloc(sizeof(*qp), GFP_KERNEL);
if (!qp)
return NULL;
- memset(qp->happy_meals, 0, sizeof(*qp->happy_meals));
-
qp->quattro_dev = child;
qp->next = qfe_sbus_list;
qfe_sbus_list = qp;
--
2.37.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: sunhme: Fix undersized zeroing of quattro->happy_meals
2022-09-28 0:41 [PATCH net-next] net: sunhme: Fix undersized zeroing of quattro->happy_meals Sean Anderson
@ 2022-09-29 2:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-29 2:50 UTC (permalink / raw)
To: Sean Anderson
Cc: davem, edumazet, kuba, pabeni, netdev, eike-kernel, zheyuma97,
nbowler, linux-mm, linux-kernel, lkp
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 27 Sep 2022 20:41:57 -0400 you wrote:
> Just use kzalloc instead.
>
> Fixes: d6f1e89bdbb8 ("sunhme: Return an ERR_PTR from quattro_pci_find")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> ---
>
> [...]
Here is the summary with links:
- [net-next] net: sunhme: Fix undersized zeroing of quattro->happy_meals
https://git.kernel.org/netdev/net-next/c/d4ddeefa64ab
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-29 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 0:41 [PATCH net-next] net: sunhme: Fix undersized zeroing of quattro->happy_meals Sean Anderson
2022-09-29 2:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox