aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/adummy.c
diff options
context:
space:
mode:
authorOm Narasimhan <om.turyx@gmail.com>2006-10-03 19:27:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-04 03:31:04 -0400
commit0c1cca1d8e0d58775dad43374f925e6cddf1bebc (patch)
tree72b5aee63958025c7e3aa03f76ae40a004b58750 /drivers/atm/adummy.c
parent617dbeaa3f2987acc83c1149409685005e9dd740 (diff)
[ATM]: kmalloc to kzalloc patches for drivers/atm
Signed-off-by: Om Narasimhan <om.turyx@gmail.com> Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil> Signed-off-by: David S. Miller <davem@davemloft.net>
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)
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");