From 16d2fb0ba75bce509c457ae7a4c445f972354608 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Fri, 13 May 2011 17:30:46 +0200 Subject: [PATCH] --- yaml --- r: 248866 b: refs/heads/master c: b0795bbf6dc6bd0a7a37d9d1ef4558e9e2b0acd6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/serial/opticon.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index edc21645cb38..bf68f529836b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2328ceaea4fb917f8b861b18151b2245233b083f +refs/heads/master: b0795bbf6dc6bd0a7a37d9d1ef4558e9e2b0acd6 diff --git a/trunk/drivers/usb/serial/opticon.c b/trunk/drivers/usb/serial/opticon.c index 1b5633f46984..96423f3c8ef3 100644 --- a/trunk/drivers/usb/serial/opticon.c +++ b/trunk/drivers/usb/serial/opticon.c @@ -289,8 +289,11 @@ static int opticon_write(struct tty_struct *tty, struct usb_serial_port *port, /* The conncected devices do not have a bulk write endpoint, * to transmit data to de barcode device the control endpoint is used */ dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); - if (!dr) - return -ENOMEM; + if (!dr) { + dev_err(&port->dev, "out of memory\n"); + count = -ENOMEM; + goto error; + } dr->bRequestType = USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT; dr->bRequest = 0x01;