aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/opticon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r--drivers/usb/serial/opticon.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index 1b5633f46984..96423f3c8ef3 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -289,8 +289,11 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port,
289 /* The conncected devices do not have a bulk write endpoint, 289 /* The conncected devices do not have a bulk write endpoint,
290 * to transmit data to de barcode device the control endpoint is used */ 290 * to transmit data to de barcode device the control endpoint is used */
291 dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); 291 dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
292 if (!dr) 292 if (!dr) {
293 return -ENOMEM; 293 dev_err(&port->dev, "out of memory\n");
294 count = -ENOMEM;
295 goto error;
296 }
294 297
295 dr->bRequestType = USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT; 298 dr->bRequestType = USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT;
296 dr->bRequest = 0x01; 299 dr->bRequest = 0x01;