aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/sierra.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-12-29 13:22:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-03 15:31:46 -0500
commit10c642d0772ac1391ae4f9fdeb13217ab019117a (patch)
treef7fe3b80ca13ff03fde6ec4b5d46aa1063a4c4dc /drivers/usb/serial/sierra.c
parent4d5147ec90531d11e7677e2c38941fc18e160641 (diff)
USB: serial: remove redundant OOM messages
Remove redundant error messages on allocation failures, which have already been logged. Cc: Joe Perches <joe@perches.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r--drivers/usb/serial/sierra.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index de958c5b52e3..a9eb6221a815 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -497,14 +497,12 @@ static int sierra_write(struct tty_struct *tty, struct usb_serial_port *port,
497 497
498 buffer = kmalloc(writesize, GFP_ATOMIC); 498 buffer = kmalloc(writesize, GFP_ATOMIC);
499 if (!buffer) { 499 if (!buffer) {
500 dev_err(&port->dev, "out of memory\n");
501 retval = -ENOMEM; 500 retval = -ENOMEM;
502 goto error_no_buffer; 501 goto error_no_buffer;
503 } 502 }
504 503
505 urb = usb_alloc_urb(0, GFP_ATOMIC); 504 urb = usb_alloc_urb(0, GFP_ATOMIC);
506 if (!urb) { 505 if (!urb) {
507 dev_err(&port->dev, "no more free urbs\n");
508 retval = -ENOMEM; 506 retval = -ENOMEM;
509 goto error_no_urb; 507 goto error_no_urb;
510 } 508 }
@@ -736,11 +734,8 @@ static struct urb *sierra_setup_urb(struct usb_serial *serial, int endpoint,
736 return NULL; 734 return NULL;
737 735
738 urb = usb_alloc_urb(0, mem_flags); 736 urb = usb_alloc_urb(0, mem_flags);
739 if (urb == NULL) { 737 if (!urb)
740 dev_dbg(&serial->dev->dev, "%s: alloc for endpoint %d failed\n",
741 __func__, endpoint);
742 return NULL; 738 return NULL;
743 }
744 739
745 buf = kmalloc(len, mem_flags); 740 buf = kmalloc(len, mem_flags);
746 if (buf) { 741 if (buf) {
@@ -752,9 +747,6 @@ static struct urb *sierra_setup_urb(struct usb_serial *serial, int endpoint,
752 dev_dbg(&serial->dev->dev, "%s %c u : %p d:%p\n", __func__, 747 dev_dbg(&serial->dev->dev, "%s %c u : %p d:%p\n", __func__,
753 dir == USB_DIR_IN ? 'i' : 'o', urb, buf); 748 dir == USB_DIR_IN ? 'i' : 'o', urb, buf);
754 } else { 749 } else {
755 dev_dbg(&serial->dev->dev, "%s %c u:%p d:%p\n", __func__,
756 dir == USB_DIR_IN ? 'i' : 'o', urb, buf);
757
758 sierra_release_urb(urb); 750 sierra_release_urb(urb);
759 urb = NULL; 751 urb = NULL;
760 } 752 }