aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2011-03-22 06:12:13 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-13 19:18:27 -0400
commit255ab56c5ae30165d506b837f6576944a02ecdf0 (patch)
tree9cd76ee827bf290a229ed576de3c7af8008c65ac /drivers/usb/class
parent59d7fec7c6908604862658a3679ac44c2c3eea44 (diff)
USB: cdc-acm: use dev_err to report failed allocations
Upgrade out-of-memory dev_dbg to dev_err. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-acm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 849aa04e6093..c9f8a837c5fa 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1143,7 +1143,7 @@ made_compressed_probe:
1143 1143
1144 acm = kzalloc(sizeof(struct acm), GFP_KERNEL); 1144 acm = kzalloc(sizeof(struct acm), GFP_KERNEL);
1145 if (acm == NULL) { 1145 if (acm == NULL) {
1146 dev_dbg(&intf->dev, "out of memory (acm kzalloc)\n"); 1146 dev_err(&intf->dev, "out of memory (acm kzalloc)\n");
1147 goto alloc_fail; 1147 goto alloc_fail;
1148 } 1148 }
1149 1149
@@ -1179,19 +1179,19 @@ made_compressed_probe:
1179 1179
1180 buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); 1180 buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
1181 if (!buf) { 1181 if (!buf) {
1182 dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n"); 1182 dev_err(&intf->dev, "out of memory (ctrl buffer alloc)\n");
1183 goto alloc_fail2; 1183 goto alloc_fail2;
1184 } 1184 }
1185 acm->ctrl_buffer = buf; 1185 acm->ctrl_buffer = buf;
1186 1186
1187 if (acm_write_buffers_alloc(acm) < 0) { 1187 if (acm_write_buffers_alloc(acm) < 0) {
1188 dev_dbg(&intf->dev, "out of memory (write buffer alloc)\n"); 1188 dev_err(&intf->dev, "out of memory (write buffer alloc)\n");
1189 goto alloc_fail4; 1189 goto alloc_fail4;
1190 } 1190 }
1191 1191
1192 acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL); 1192 acm->ctrlurb = usb_alloc_urb(0, GFP_KERNEL);
1193 if (!acm->ctrlurb) { 1193 if (!acm->ctrlurb) {
1194 dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n"); 1194 dev_err(&intf->dev, "out of memory (ctrlurb kmalloc)\n");
1195 goto alloc_fail5; 1195 goto alloc_fail5;
1196 } 1196 }
1197 for (i = 0; i < num_rx_buf; i++) { 1197 for (i = 0; i < num_rx_buf; i++) {
@@ -1199,7 +1199,7 @@ made_compressed_probe:
1199 1199
1200 rcv->urb = usb_alloc_urb(0, GFP_KERNEL); 1200 rcv->urb = usb_alloc_urb(0, GFP_KERNEL);
1201 if (rcv->urb == NULL) { 1201 if (rcv->urb == NULL) {
1202 dev_dbg(&intf->dev, 1202 dev_err(&intf->dev,
1203 "out of memory (read urbs usb_alloc_urb)\n"); 1203 "out of memory (read urbs usb_alloc_urb)\n");
1204 goto alloc_fail6; 1204 goto alloc_fail6;
1205 } 1205 }
@@ -1213,7 +1213,7 @@ made_compressed_probe:
1213 rb->base = usb_alloc_coherent(acm->dev, readsize, 1213 rb->base = usb_alloc_coherent(acm->dev, readsize,
1214 GFP_KERNEL, &rb->dma); 1214 GFP_KERNEL, &rb->dma);
1215 if (!rb->base) { 1215 if (!rb->base) {
1216 dev_dbg(&intf->dev, 1216 dev_err(&intf->dev,
1217 "out of memory (read bufs usb_alloc_coherent)\n"); 1217 "out of memory (read bufs usb_alloc_coherent)\n");
1218 goto alloc_fail7; 1218 goto alloc_fail7;
1219 } 1219 }
@@ -1223,7 +1223,7 @@ made_compressed_probe:
1223 1223
1224 snd->urb = usb_alloc_urb(0, GFP_KERNEL); 1224 snd->urb = usb_alloc_urb(0, GFP_KERNEL);
1225 if (snd->urb == NULL) { 1225 if (snd->urb == NULL) {
1226 dev_dbg(&intf->dev, 1226 dev_err(&intf->dev,
1227 "out of memory (write urbs usb_alloc_urb)\n"); 1227 "out of memory (write urbs usb_alloc_urb)\n");
1228 goto alloc_fail8; 1228 goto alloc_fail8;
1229 } 1229 }