diff options
author | Stelian Nirlu <steliannirlu@gmail.com> | 2013-03-11 12:22:10 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-04-17 08:07:27 -0400 |
commit | 3d04fea5e7527e950b31542f27df5cb51ca581b4 (patch) | |
tree | 818c11a0ad1aaefbe2bcfd2c922cc576754bdcb5 /arch/s390/net | |
parent | 040495d110ba9edc347b3af0e119d1b0d0a8ac87 (diff) |
s390/bpf,jit: use kcalloc instead of kmalloc and memset
Signed-off-by: Stelian Nirlu <steliannirlu@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/net')
-rw-r--r-- | arch/s390/net/bpf_jit_comp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c index 0972e91cced2..82f165f8078c 100644 --- a/arch/s390/net/bpf_jit_comp.c +++ b/arch/s390/net/bpf_jit_comp.c | |||
@@ -747,10 +747,9 @@ void bpf_jit_compile(struct sk_filter *fp) | |||
747 | 747 | ||
748 | if (!bpf_jit_enable) | 748 | if (!bpf_jit_enable) |
749 | return; | 749 | return; |
750 | addrs = kmalloc(fp->len * sizeof(*addrs), GFP_KERNEL); | 750 | addrs = kcalloc(fp->len, sizeof(*addrs), GFP_KERNEL); |
751 | if (addrs == NULL) | 751 | if (addrs == NULL) |
752 | return; | 752 | return; |
753 | memset(addrs, 0, fp->len * sizeof(*addrs)); | ||
754 | memset(&jit, 0, sizeof(cjit)); | 753 | memset(&jit, 0, sizeof(cjit)); |
755 | memset(&cjit, 0, sizeof(cjit)); | 754 | memset(&cjit, 0, sizeof(cjit)); |
756 | 755 | ||