Commit 255ab56c authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: cdc-acm: use dev_err to report failed allocations

Upgrade out-of-memory dev_dbg to dev_err.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 59d7fec7
...@@ -1143,7 +1143,7 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1143,7 +1143,7 @@ static int acm_probe(struct usb_interface *intf,
acm = kzalloc(sizeof(struct acm), GFP_KERNEL); acm = kzalloc(sizeof(struct acm), GFP_KERNEL);
if (acm == NULL) { if (acm == NULL) {
dev_dbg(&intf->dev, "out of memory (acm kzalloc)\n"); dev_err(&intf->dev, "out of memory (acm kzalloc)\n");
goto alloc_fail; goto alloc_fail;
} }
...@@ -1179,19 +1179,19 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1179,19 +1179,19 @@ static int acm_probe(struct usb_interface *intf,
buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
if (!buf) { if (!buf) {
dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n"); dev_err(&intf->dev, "out of memory (ctrl buffer alloc)\n");
goto alloc_fail2; goto alloc_fail2;
} }
acm->ctrl_buffer = buf; acm->ctrl_buffer = buf;
if (acm_write_buffers_alloc(acm) < 0) { if (acm_write_buffers_alloc(acm) < 0) {
dev_dbg(&intf->dev, "out of memory (write buffer alloc)\n"); dev_err(&intf->dev, "out of memory (write buffer alloc)\n");
goto alloc_fail4; goto alloc_fail4;
} }
acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL); acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL);
if (!acm->ctrlurb) { if (!acm->ctrlurb) {
dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n"); dev_err(&intf->dev, "out of memory (ctrlurb kmalloc)\n");
goto alloc_fail5; goto alloc_fail5;
} }
for (i = 0; i < num_rx_buf; i++) { for (i = 0; i < num_rx_buf; i++) {
...@@ -1199,7 +1199,7 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1199,7 +1199,7 @@ static int acm_probe(struct usb_interface *intf,
rcv->urb = usb_alloc_urb(0, GFP_KERNEL); rcv->urb = usb_alloc_urb(0, GFP_KERNEL);
if (rcv->urb == NULL) { if (rcv->urb == NULL) {
dev_dbg(&intf->dev, dev_err(&intf->dev,
"out of memory (read urbs usb_alloc_urb)\n"); "out of memory (read urbs usb_alloc_urb)\n");
goto alloc_fail6; goto alloc_fail6;
} }
...@@ -1213,7 +1213,7 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1213,7 +1213,7 @@ static int acm_probe(struct usb_interface *intf,
rb->base = usb_alloc_coherent(acm->dev, readsize, rb->base = usb_alloc_coherent(acm->dev, readsize,
GFP_KERNEL, &rb->dma); GFP_KERNEL, &rb->dma);
if (!rb->base) { if (!rb->base) {
dev_dbg(&intf->dev, dev_err(&intf->dev,
"out of memory (read bufs usb_alloc_coherent)\n"); "out of memory (read bufs usb_alloc_coherent)\n");
goto alloc_fail7; goto alloc_fail7;
} }
...@@ -1223,7 +1223,7 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1223,7 +1223,7 @@ static int acm_probe(struct usb_interface *intf,
snd->urb = usb_alloc_urb(0, GFP_KERNEL); snd->urb = usb_alloc_urb(0, GFP_KERNEL);
if (snd->urb == NULL) { if (snd->urb == NULL) {
dev_dbg(&intf->dev, dev_err(&intf->dev,
"out of memory (write urbs usb_alloc_urb)\n"); "out of memory (write urbs usb_alloc_urb)\n");
goto alloc_fail8; goto alloc_fail8;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment