summaryrefslogtreecommitdiff
path: root/drivers/atm/adummy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atm/adummy.c')
-rw-r--r--drivers/atm/adummy.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c
index 6cc93de0b71d..ac2c10822be0 100644
--- a/drivers/atm/adummy.c
+++ b/drivers/atm/adummy.c
@@ -113,15 +113,13 @@ static int __init adummy_init(void)
printk(KERN_ERR "adummy: version %s\n", DRV_VERSION);
- adummy_dev = (struct adummy_dev *) kmalloc(sizeof(struct adummy_dev),
+ adummy_dev = kzalloc(sizeof(struct adummy_dev),
GFP_KERNEL);
if (!adummy_dev) {
- printk(KERN_ERR DEV_LABEL ": kmalloc() failed\n");
+ printk(KERN_ERR DEV_LABEL ": kzalloc() failed\n");
err = -ENOMEM;
goto out;
}
- memset(adummy_dev, 0, sizeof(struct adummy_dev));
-
atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL);
if (!atm_dev) {
printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n");