diff options
author | Manohar Vanga <manohar.vanga@cern.ch> | 2011-08-01 06:20:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-23 18:05:02 -0400 |
commit | 34a678110ac5d2f1b694c8b9df5cccb1a2607721 (patch) | |
tree | 9855fe584fa4a960b1be06ef7635452cfcc3ed41 /drivers/staging/vme/devices/vme_user.c | |
parent | 0428fec32c5fde013cb8223c248972941b18ca59 (diff) |
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>
Diffstat (limited to 'drivers/staging/vme/devices/vme_user.c')
-rw-r--r-- | drivers/staging/vme/devices/vme_user.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index 91d2cc7bb4c..3cbeb2ada41 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c | |||
@@ -651,7 +651,7 @@ static int __init vme_user_init(void) | |||
651 | 651 | ||
652 | 652 | ||
653 | /* Dynamically create the bind table based on module parameters */ | 653 | /* Dynamically create the bind table based on module parameters */ |
654 | ids = kmalloc(sizeof(struct vme_device_id) * (bus_num + 1), GFP_KERNEL); | 654 | ids = kzalloc(sizeof(struct vme_device_id) * (bus_num + 1), GFP_KERNEL); |
655 | if (ids == NULL) { | 655 | if (ids == NULL) { |
656 | printk(KERN_ERR "%s: Unable to allocate ID table\n", | 656 | printk(KERN_ERR "%s: Unable to allocate ID table\n", |
657 | driver_name); | 657 | driver_name); |
@@ -659,8 +659,6 @@ static int __init vme_user_init(void) | |||
659 | goto err_id; | 659 | goto err_id; |
660 | } | 660 | } |
661 | 661 | ||
662 | memset(ids, 0, (sizeof(struct vme_device_id) * (bus_num + 1))); | ||
663 | |||
664 | for (i = 0; i < bus_num; i++) { | 662 | for (i = 0; i < bus_num; i++) { |
665 | ids[i].bus = bus[i]; | 663 | ids[i].bus = bus[i]; |
666 | /* | 664 | /* |