staging: vme_user: change kmalloc+memset to kzalloc

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Manohar Vanga 2011-08-01 12:20:46 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель 0428fec32c
Коммит 34a678110a
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -651,7 +651,7 @@ static int __init vme_user_init(void)
/* Dynamically create the bind table based on module parameters */ /* Dynamically create the bind table based on module parameters */
ids = kmalloc(sizeof(struct vme_device_id) * (bus_num + 1), GFP_KERNEL); ids = kzalloc(sizeof(struct vme_device_id) * (bus_num + 1), GFP_KERNEL);
if (ids == NULL) { if (ids == NULL) {
printk(KERN_ERR "%s: Unable to allocate ID table\n", printk(KERN_ERR "%s: Unable to allocate ID table\n",
driver_name); driver_name);
@ -659,8 +659,6 @@ static int __init vme_user_init(void)
goto err_id; goto err_id;
} }
memset(ids, 0, (sizeof(struct vme_device_id) * (bus_num + 1)));
for (i = 0; i < bus_num; i++) { for (i = 0; i < bus_num; i++) {
ids[i].bus = bus[i]; ids[i].bus = bus[i];
/* /*