[PATCH] drivers/net/wireless/prism54/oid_mgt.c: kmalloc + memset conversion to kzalloc
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Tue, 31 Jul 2007 21:34:50 +0000 (23:34 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:49:36 +0000 (16:49 -0700)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/prism54/oid_mgt.c

index 42780320cd5cbef6ab1a2b9b13f91877b996c719..57a4ac34bed6cd2eefcb9034ae5a85ec75bfc642 100644 (file)
@@ -244,13 +244,11 @@ mgt_init(islpci_private *priv)
        /* Alloc the cache */
        for (i = 0; i < OID_NUM_LAST; i++) {
                if (isl_oid[i].flags & OID_FLAG_CACHED) {
-                       priv->mib[i] = kmalloc(isl_oid[i].size *
+                       priv->mib[i] = kzalloc(isl_oid[i].size *
                                               (isl_oid[i].range + 1),
                                               GFP_KERNEL);
                        if (!priv->mib[i])
                                return -ENOMEM;
-                       memset(priv->mib[i], 0,
-                              isl_oid[i].size * (isl_oid[i].range + 1));
                } else
                        priv->mib[i] = NULL;
        }