usb: atm: usbatm: don't print on ENOMEM
All kmalloc-based functions print enough information on failures. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
59e1200ecb
commit
52879bb190
@@ -819,7 +819,6 @@ static int usbatm_atm_open(struct atm_vcc *vcc)
|
|||||||
|
|
||||||
new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL);
|
new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL);
|
||||||
if (!new) {
|
if (!new) {
|
||||||
atm_err(instance, "%s: no memory for vcc_data!\n", __func__);
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@@ -1032,10 +1031,8 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
|
|||||||
|
|
||||||
/* instance init */
|
/* instance init */
|
||||||
instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
|
instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
|
||||||
if (!instance) {
|
if (!instance)
|
||||||
dev_err(dev, "%s: no memory for instance data!\n", __func__);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
/* public fields */
|
/* public fields */
|
||||||
|
|
||||||
@@ -1150,7 +1147,6 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
|
|||||||
/* zero the tx padding to avoid leaking information */
|
/* zero the tx padding to avoid leaking information */
|
||||||
buffer = kzalloc(channel->buf_size, GFP_KERNEL);
|
buffer = kzalloc(channel->buf_size, GFP_KERNEL);
|
||||||
if (!buffer) {
|
if (!buffer) {
|
||||||
dev_err(dev, "%s: no memory for buffer %d!\n", __func__, i);
|
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
goto fail_unbind;
|
goto fail_unbind;
|
||||||
}
|
}
|
||||||
@@ -1181,7 +1177,6 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
|
|||||||
instance->cell_buf = kmalloc(instance->rx_channel.stride, GFP_KERNEL);
|
instance->cell_buf = kmalloc(instance->rx_channel.stride, GFP_KERNEL);
|
||||||
|
|
||||||
if (!instance->cell_buf) {
|
if (!instance->cell_buf) {
|
||||||
dev_err(dev, "%s: no memory for cell buffer!\n", __func__);
|
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
goto fail_unbind;
|
goto fail_unbind;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user