aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/oti6858.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/oti6858.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/oti6858.c')
-rw-r--r--drivers/usb/serial/oti6858.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index a2080ac7b7e5..1dea599bb71b 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -200,8 +200,7 @@ static void setup_line(struct work_struct *work)
200 int result; 200 int result;
201 201
202 new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL); 202 new_setup = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL);
203 if (new_setup == NULL) { 203 if (!new_setup) {
204 dev_err(&port->dev, "%s(): out of memory!\n", __func__);
205 /* we will try again */ 204 /* we will try again */
206 schedule_delayed_work(&priv->delayed_setup_work, 205 schedule_delayed_work(&priv->delayed_setup_work,
207 msecs_to_jiffies(2)); 206 msecs_to_jiffies(2));
@@ -287,11 +286,9 @@ static void send_data(struct work_struct *work)
287 286
288 if (count != 0) { 287 if (count != 0) {
289 allow = kmalloc(1, GFP_KERNEL); 288 allow = kmalloc(1, GFP_KERNEL);
290 if (!allow) { 289 if (!allow)
291 dev_err_console(port, "%s(): kmalloc failed\n",
292 __func__);
293 return; 290 return;
294 } 291
295 result = usb_control_msg(port->serial->dev, 292 result = usb_control_msg(port->serial->dev,
296 usb_rcvctrlpipe(port->serial->dev, 0), 293 usb_rcvctrlpipe(port->serial->dev, 0),
297 OTI6858_REQ_T_CHECK_TXBUFF, 294 OTI6858_REQ_T_CHECK_TXBUFF,
@@ -517,10 +514,8 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
517 usb_clear_halt(serial->dev, port->read_urb->pipe); 514 usb_clear_halt(serial->dev, port->read_urb->pipe);
518 515
519 buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL); 516 buf = kmalloc(OTI6858_CTRL_PKT_SIZE, GFP_KERNEL);
520 if (buf == NULL) { 517 if (!buf)
521 dev_err(&port->dev, "%s(): out of memory!\n", __func__);
522 return -ENOMEM; 518 return -ENOMEM;
523 }
524 519
525 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), 520 result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
526 OTI6858_REQ_T_GET_STATUS, 521 OTI6858_REQ_T_GET_STATUS,