diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-12-29 19:22:56 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-03 12:31:46 -0800 |
commit | 10c642d0772ac1391ae4f9fdeb13217ab019117a (patch) | |
tree | f7fe3b80ca13ff03fde6ec4b5d46aa1063a4c4dc /drivers/usb/serial/kl5kusb105.c | |
parent | 4d5147ec90531d11e7677e2c38941fc18e160641 (diff) | |
download | talos-obmc-linux-10c642d0772ac1391ae4f9fdeb13217ab019117a.tar.gz talos-obmc-linux-10c642d0772ac1391ae4f9fdeb13217ab019117a.zip |
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/kl5kusb105.c')
-rw-r--r-- | drivers/usb/serial/kl5kusb105.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 1b4054fe52a5..4f441c2c0668 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c @@ -182,11 +182,9 @@ static int klsi_105_get_line_state(struct usb_serial_port *port, dev_info(&port->serial->dev->dev, "sending SIO Poll request\n"); status_buf = kmalloc(KLSI_STATUSBUF_LEN, GFP_KERNEL); - if (!status_buf) { - dev_err(&port->dev, "%s - out of memory for status buffer.\n", - __func__); + if (!status_buf) return -ENOMEM; - } + status_buf[0] = 0xff; status_buf[1] = 0xff; rc = usb_control_msg(port->serial->dev, @@ -273,11 +271,9 @@ static int klsi_105_open(struct tty_struct *tty, struct usb_serial_port *port) * priv->line_state. */ cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); - if (!cfg) { - dev_err(&port->dev, "%s - out of memory for config buffer.\n", - __func__); + if (!cfg) return -ENOMEM; - } + cfg->pktlen = 5; cfg->baudrate = kl5kusb105a_sio_b9600; cfg->databits = kl5kusb105a_dtb_8; @@ -417,10 +413,8 @@ static void klsi_105_set_termios(struct tty_struct *tty, speed_t baud; cfg = kmalloc(sizeof(*cfg), GFP_KERNEL); - if (!cfg) { - dev_err(dev, "%s - out of memory for config buffer.\n", __func__); + if (!cfg) return; - } /* lock while we are modifying the settings */ spin_lock_irqsave(&priv->lock, flags); |