Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19205
b: refs/heads/master
c: 9a734ef
h: refs/heads/master
i:
  19203: 1f767d2
v: v3
  • Loading branch information
Duncan Sands authored and Greg Kroah-Hartman committed Feb 1, 2006
1 parent dd50b19 commit 8218ab4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0dfcd3e4444e88285ee7c199d0cbda21551d8c5d
refs/heads/master: 9a734efec36c991a74610c6c81d28d4222e1c02b
4 changes: 1 addition & 3 deletions trunk/drivers/usb/atm/cxacru.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,14 +673,12 @@ static int cxacru_bind(struct usbatm_data *usbatm_instance,
int ret;

/* instance init */
instance = kmalloc(sizeof(*instance), GFP_KERNEL);
instance = kzalloc(sizeof(*instance), GFP_KERNEL);
if (!instance) {
dbg("cxacru_bind: no memory for instance data");
return -ENOMEM;
}

memset(instance, 0, sizeof(*instance));

instance->usbatm = usbatm_instance;
instance->modem_type = (struct cxacru_modem_type *) id->driver_info;

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/usb/atm/speedtch.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,16 +715,14 @@ static int speedtch_bind(struct usbatm_data *usbatm,
}
}

instance = kmalloc(sizeof(*instance), GFP_KERNEL);
instance = kzalloc(sizeof(*instance), GFP_KERNEL);

if (!instance) {
usb_err(usbatm, "%s: no memory for instance data!\n", __func__);
ret = -ENOMEM;
goto fail_release;
}

memset(instance, 0, sizeof(struct speedtch_instance_data));

instance->usbatm = usbatm;

INIT_WORK(&instance->status_checker, (void *)speedtch_check_status, instance);
Expand Down
8 changes: 3 additions & 5 deletions trunk/drivers/usb/atm/usbatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,12 @@ static int usbatm_atm_open(struct atm_vcc *vcc)
goto fail;
}

if (!(new = kmalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL))) {
if (!(new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL))) {
atm_err(instance, "%s: no memory for vcc_data!\n", __func__);
ret = -ENOMEM;
goto fail;
}

memset(new, 0, sizeof(struct usbatm_vcc_data));
new->vcc = vcc;
new->vpi = vpi;
new->vci = vci;
Expand Down Expand Up @@ -1066,13 +1065,12 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,

instance->urbs[i] = urb;

buffer = kmalloc(channel->buf_size, GFP_KERNEL);
/* zero the tx padding to avoid leaking information */
buffer = kzalloc(channel->buf_size, GFP_KERNEL);
if (!buffer) {
dev_err(dev, "%s: no memory for buffer %d!\n", __func__, i);
goto fail_unbind;
}
/* zero the tx padding to avoid leaking information */
memset(buffer, 0, channel->buf_size);

usb_fill_bulk_urb(urb, instance->usb_dev, channel->endpoint,
buffer, channel->buf_size, usbatm_complete, channel);
Expand Down

0 comments on commit 8218ab4

Please sign in to comment.