mirror of https://gitee.com/openkylin/linux.git
[PATCH] drivers/net/wireless/prism54/oid_mgt.c: kmalloc + memset conversion to kzalloc
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>
This commit is contained in:
parent
3623060abb
commit
8951554dba
|
@ -244,13 +244,11 @@ mgt_init(islpci_private *priv)
|
||||||
/* Alloc the cache */
|
/* Alloc the cache */
|
||||||
for (i = 0; i < OID_NUM_LAST; i++) {
|
for (i = 0; i < OID_NUM_LAST; i++) {
|
||||||
if (isl_oid[i].flags & OID_FLAG_CACHED) {
|
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),
|
(isl_oid[i].range + 1),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!priv->mib[i])
|
if (!priv->mib[i])
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset(priv->mib[i], 0,
|
|
||||||
isl_oid[i].size * (isl_oid[i].range + 1));
|
|
||||||
} else
|
} else
|
||||||
priv->mib[i] = NULL;
|
priv->mib[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue