diff options
author | Varsha Rao <rvarsha016@gmail.com> | 2017-03-28 16:06:49 +0530 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2017-03-30 14:44:14 +0200 |
commit | 848850a3e9161e2cdcbb5cef7edc21ba49252ad1 (patch) | |
tree | ec4f569b4a902f8e586eaebd9df73983f6bc7a09 /net/netfilter/ipvs | |
parent | 41390895e50bc4f28abe384c6b35ac27464a20ec (diff) | |
download | lwn-848850a3e9161e2cdcbb5cef7edc21ba49252ad1.tar.gz lwn-848850a3e9161e2cdcbb5cef7edc21ba49252ad1.zip |
netfilter: ipvs: Replace kzalloc with kcalloc.
Replace kzalloc with kcalloc. As kcalloc is preferred for allocating an
array instead of kzalloc. This patch fixes the checkpatch issue.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Diffstat (limited to 'net/netfilter/ipvs')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index b03c28084f81..30d6b2cc00a0 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c @@ -1849,7 +1849,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c, if (state == IP_VS_STATE_MASTER) { struct ipvs_master_sync_state *ms; - ipvs->ms = kzalloc(count * sizeof(ipvs->ms[0]), GFP_KERNEL); + ipvs->ms = kcalloc(count, sizeof(ipvs->ms[0]), GFP_KERNEL); if (!ipvs->ms) goto out; ms = ipvs->ms; @@ -1862,7 +1862,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c, ms->ipvs = ipvs; } } else { - array = kzalloc(count * sizeof(struct task_struct *), + array = kcalloc(count, sizeof(struct task_struct *), GFP_KERNEL); if (!array) goto out; |