Skip to content

Commit

Permalink
staging: vme_user: change kmalloc+memset to kzalloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Manohar Vanga authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 0428fec commit 34a6781
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/vme/devices/vme_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,16 +651,14 @@ static int __init vme_user_init(void)


/* 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) {
printk(KERN_ERR "%s: Unable to allocate ID table\n",
driver_name);
retval = -ENOMEM;
goto err_id;
}

memset(ids, 0, (sizeof(struct vme_device_id) * (bus_num + 1)));

for (i = 0; i < bus_num; i++) {
ids[i].bus = bus[i];
/*
Expand Down

0 comments on commit 34a6781

Please sign in to comment.