aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa-dev@sang-engineering.com>2016-08-25 13:38:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 13:17:36 -0400
commit52879bb190bbda82603c857d37e3826b3aa2832a (patch)
tree7afac66a3d53a0440d5eb0501c0980d67436226c
parent59e1200ecb5bfc42da895f423b16b01f9cf92e64 (diff)
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>
-rw-r--r--drivers/usb/atm/usbatm.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
index 5e4f46c5a300..4dec9df8764b 100644
--- a/drivers/usb/atm/usbatm.c
+++ b/drivers/usb/atm/usbatm.c
@@ -819,7 +819,6 @@ static int usbatm_atm_open(struct atm_vcc *vcc)
819 819
820 new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL); 820 new = kzalloc(sizeof(struct usbatm_vcc_data), GFP_KERNEL);
821 if (!new) { 821 if (!new) {
822 atm_err(instance, "%s: no memory for vcc_data!\n", __func__);
823 ret = -ENOMEM; 822 ret = -ENOMEM;
824 goto fail; 823 goto fail;
825 } 824 }
@@ -1032,10 +1031,8 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
1032 1031
1033 /* instance init */ 1032 /* instance init */
1034 instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL); 1033 instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
1035 if (!instance) { 1034 if (!instance)
1036 dev_err(dev, "%s: no memory for instance data!\n", __func__);
1037 return -ENOMEM; 1035 return -ENOMEM;
1038 }
1039 1036
1040 /* public fields */ 1037 /* public fields */
1041 1038
@@ -1150,7 +1147,6 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
1150 /* zero the tx padding to avoid leaking information */ 1147 /* zero the tx padding to avoid leaking information */
1151 buffer = kzalloc(channel->buf_size, GFP_KERNEL); 1148 buffer = kzalloc(channel->buf_size, GFP_KERNEL);
1152 if (!buffer) { 1149 if (!buffer) {
1153 dev_err(dev, "%s: no memory for buffer %d!\n", __func__, i);
1154 error = -ENOMEM; 1150 error = -ENOMEM;
1155 goto fail_unbind; 1151 goto fail_unbind;
1156 } 1152 }
@@ -1181,7 +1177,6 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
1181 instance->cell_buf = kmalloc(instance->rx_channel.stride, GFP_KERNEL); 1177 instance->cell_buf = kmalloc(instance->rx_channel.stride, GFP_KERNEL);
1182 1178
1183 if (!instance->cell_buf) { 1179 if (!instance->cell_buf) {
1184 dev_err(dev, "%s: no memory for cell buffer!\n", __func__);
1185 error = -ENOMEM; 1180 error = -ENOMEM;
1186 goto fail_unbind; 1181 goto fail_unbind;
1187 } 1182 }