diff mbox series

[net-next] net: sunhme: Fix undersized zeroing of quattro->happy_meals

Message ID 20220928004157.279731-1-seanga2@gmail.com (mailing list archive)
State Accepted
Commit d4ddeefa64ab36d211ff57a64d263c158e017581
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: sunhme: Fix undersized zeroing of quattro->happy_meals | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sean Anderson Sept. 28, 2022, 12:41 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 29, 2022, 2:50 a.m. UTC | #1
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!
diff mbox series

Patch

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;