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/ti_usb_3410_5052.c | |
parent | 4d5147ec90531d11e7677e2c38941fc18e160641 (diff) | |
download | op-kernel-dev-10c642d0772ac1391ae4f9fdeb13217ab019117a.zip op-kernel-dev-10c642d0772ac1391ae4f9fdeb13217ab019117a.tar.gz |
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/ti_usb_3410_5052.c')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 4a649ed..698dc14 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -301,10 +301,9 @@ static int ti_startup(struct usb_serial *serial) /* create device structure */ tdev = kzalloc(sizeof(struct ti_device), GFP_KERNEL); - if (tdev == NULL) { - dev_err(&dev->dev, "%s - out of memory\n", __func__); + if (!tdev) return -ENOMEM; - } + mutex_init(&tdev->td_open_close_lock); tdev->td_serial = serial; usb_set_serial_data(serial, tdev); @@ -722,10 +721,8 @@ static void ti_set_termios(struct tty_struct *tty, return; config = kmalloc(sizeof(*config), GFP_KERNEL); - if (!config) { - dev_err(&port->dev, "%s - out of memory\n", __func__); + if (!config) return; - } config->wFlags = 0; @@ -1194,10 +1191,8 @@ static int ti_get_lsr(struct ti_port *tport, u8 *lsr) size = sizeof(struct ti_port_status); data = kmalloc(size, GFP_KERNEL); - if (!data) { - dev_err(&port->dev, "%s - out of memory\n", __func__); + if (!data) return -ENOMEM; - } status = ti_command_in_sync(tdev, TI_GET_PORT_STATUS, (__u8)(TI_UART1_PORT+port_number), 0, (__u8 *)data, size); @@ -1397,10 +1392,8 @@ static int ti_write_byte(struct usb_serial_port *port, size = sizeof(struct ti_write_data_bytes) + 2; data = kmalloc(size, GFP_KERNEL); - if (!data) { - dev_err(&port->dev, "%s - out of memory\n", __func__); + if (!data) return -ENOMEM; - } data->bAddrType = TI_RW_DATA_ADDR_XDATA; data->bDataType = TI_RW_DATA_BYTE; @@ -1516,7 +1509,6 @@ static int ti_download_firmware(struct ti_device *tdev) status = ti_do_download(dev, pipe, buffer, fw_p->size); kfree(buffer); } else { - dev_dbg(&dev->dev, "%s ENOMEM\n", __func__); status = -ENOMEM; } release_firmware(fw_p); |