summaryrefslogtreecommitdiffstats
path: root/drivers/atm/idt77252.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-28 10:36:23 -0700
committerJiri Kosina <jkosina@suse.cz>2011-09-15 13:55:02 +0200
commit3a816054fcd345d0fe47c666c375d372c6170371 (patch)
tree8b775cdb79a0c8d1759b4eaa7adbd57b0fae01ce /drivers/atm/idt77252.c
parentdc8a5c9935d8e63123fab0d0033f15819351d0bf (diff)
downloadlinux-stable-3a816054fcd345d0fe47c666c375d372c6170371.tar.gz
linux-stable-3a816054fcd345d0fe47c666c375d372c6170371.tar.bz2
linux-stable-3a816054fcd345d0fe47c666c375d372c6170371.zip
atm: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/atm/idt77252.c')
-rw-r--r--drivers/atm/idt77252.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index be0dbfeb541c..47648535afa7 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3416,27 +3416,28 @@ init_card(struct atm_dev *dev)
size = sizeof(struct vc_map *) * card->tct_size;
IPRINTK("%s: allocate %d byte for VC map.\n", card->name, size);
- if (NULL == (card->vcs = vmalloc(size))) {
+ card->vcs = vzalloc(size);
+ if (!card->vcs) {
printk("%s: memory allocation failure.\n", card->name);
deinit_card(card);
return -1;
}
- memset(card->vcs, 0, size);
size = sizeof(struct vc_map *) * card->scd_size;
IPRINTK("%s: allocate %d byte for SCD to VC mapping.\n",
card->name, size);
- if (NULL == (card->scd2vc = vmalloc(size))) {
+ card->scd2vc = vzalloc(size);
+ if (!card->scd2vc) {
printk("%s: memory allocation failure.\n", card->name);
deinit_card(card);
return -1;
}
- memset(card->scd2vc, 0, size);
size = sizeof(struct tst_info) * (card->tst_size - 2);
IPRINTK("%s: allocate %d byte for TST to VC mapping.\n",
card->name, size);
- if (NULL == (card->soft_tst = vmalloc(size))) {
+ card->soft_tst = vmalloc(size);
+ if (!card->soft_tst) {
printk("%s: memory allocation failure.\n", card->name);
deinit_card(card);
return -1;