summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ds.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-12-11 21:18:26 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-06 00:28:06 +0100
commit8084b372adac9c24ff7abdd939b2e8816e7b88a3 (patch)
treea4a4005d7b025abc0a3e7693404abd0abbfd434b /drivers/pcmcia/ds.c
parent6423efaacbf0bce6372897e793d8450c1c08ec8d (diff)
downloadkernel-crypto-8084b372adac9c24ff7abdd939b2e8816e7b88a3.tar.gz
kernel-crypto-8084b372adac9c24ff7abdd939b2e8816e7b88a3.tar.xz
kernel-crypto-8084b372adac9c24ff7abdd939b2e8816e7b88a3.zip
[PATCH] pcmcia: kzalloc conversion
Convert users of kmalloc and memset to kzalloc Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r--drivers/pcmcia/ds.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 0fc61dd1d4d..0252582b91c 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -264,12 +264,10 @@ static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename)
if (fw->size >= CISTPL_MAX_CIS_SIZE)
goto release;
- cis = kmalloc(sizeof(cisdump_t), GFP_KERNEL);
+ cis = kzalloc(sizeof(cisdump_t), GFP_KERNEL);
if (!cis)
goto release;
- memset(cis, 0, sizeof(cisdump_t));
-
cis->Length = fw->size + 1;
memcpy(cis->Data, fw->data, fw->size);
@@ -387,13 +385,12 @@ static int pcmcia_device_probe(struct device * dev)
s->functions = mfc.nfn;
else
s->functions = 1;
- s->config = kmalloc(sizeof(config_t) * s->functions,
+ s->config = kzalloc(sizeof(config_t) * s->functions,
GFP_KERNEL);
if (!s->config) {
ret = -ENOMEM;
goto put_module;
}
- memset(s->config, 0, sizeof(config_t) * s->functions);
}
ret = p_drv->probe(p_dev);
@@ -572,10 +569,9 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
if (s->device_count == 2)
goto err_put;
- p_dev = kmalloc(sizeof(struct pcmcia_device), GFP_KERNEL);
+ p_dev = kzalloc(sizeof(struct pcmcia_device), GFP_KERNEL);
if (!p_dev)
goto err_put;
- memset(p_dev, 0, sizeof(struct pcmcia_device));
p_dev->socket = s;
p_dev->device_no = (s->device_count++);