diff options
Diffstat (limited to 'drivers/atm/adummy.c')
-rw-r--r-- | drivers/atm/adummy.c | 6 |
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) | |||
113 | 113 | ||
114 | printk(KERN_ERR "adummy: version %s\n", DRV_VERSION); | 114 | printk(KERN_ERR "adummy: version %s\n", DRV_VERSION); |
115 | 115 | ||
116 | adummy_dev = (struct adummy_dev *) kmalloc(sizeof(struct adummy_dev), | 116 | adummy_dev = kzalloc(sizeof(struct adummy_dev), |
117 | GFP_KERNEL); | 117 | GFP_KERNEL); |
118 | if (!adummy_dev) { | 118 | if (!adummy_dev) { |
119 | printk(KERN_ERR DEV_LABEL ": kmalloc() failed\n"); | 119 | printk(KERN_ERR DEV_LABEL ": kzalloc() failed\n"); |
120 | err = -ENOMEM; | 120 | err = -ENOMEM; |
121 | goto out; | 121 | goto out; |
122 | } | 122 | } |
123 | memset(adummy_dev, 0, sizeof(struct adummy_dev)); | ||
124 | |||
125 | atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL); | 123 | atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL); |
126 | if (!atm_dev) { | 124 | if (!atm_dev) { |
127 | printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n"); | 125 | printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n"); |