Staging: Use kcalloc or kzalloc
[safe/jmp/linux-2.6] / drivers / staging / rtl8192u / ieee80211 / api.c
index c627d02..5f46e50 100644 (file)
@@ -131,12 +131,10 @@ struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)
        if (alg == NULL)
                goto out;
 
-       tfm = kmalloc(sizeof(*tfm) + alg->cra_ctxsize, GFP_KERNEL);
+       tfm = kzalloc(sizeof(*tfm) + alg->cra_ctxsize, GFP_KERNEL);
        if (tfm == NULL)
                goto out_put;
 
-       memset(tfm, 0, sizeof(*tfm) + alg->cra_ctxsize);
-
        tfm->__crt_alg = alg;
 
        if (crypto_init_flags(tfm, flags))