netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: nfnl_cthelper: Replace kzalloc with kcalloc
@ 2017-10-12 22:22 Harsha Sharma
  2017-10-12 23:42 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Harsha Sharma @ 2017-10-12 22:22 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, outreachy-kernel, Harsha Sharma

kcalloc is preferred to allocate an array instead of kzalloc.
This patch fixes checkpatch isssue.

Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
---
 net/netfilter/nfnetlink_cthelper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
index 41628b393673..f1ce335b9158 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -189,7 +189,7 @@ nfnl_cthelper_parse_expect_policy(struct nf_conntrack_helper *helper,
 	if (class_max > NF_CT_MAX_EXPECT_CLASSES)
 		return -EOVERFLOW;
 
-	expect_policy = kzalloc(sizeof(struct nf_conntrack_expect_policy) *
+	expect_policy = kcalloc(sizeof(struct nf_conntrack_expect_policy) *
 				class_max, GFP_KERNEL);
 	if (expect_policy == NULL)
 		return -ENOMEM;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-12 23:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 22:22 [PATCH] netfilter: nfnl_cthelper: Replace kzalloc with kcalloc Harsha Sharma
2017-10-12 23:42 ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).