USB: opticon: fix non-atomic allocation in write path
[pandora-kernel.git] / drivers / usb / serial / opticon.c
index d6c5ed6..e629533 100644 (file)
@@ -293,7 +293,7 @@ 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);
+       dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_ATOMIC);
        if (!dr) {
                dev_err(&port->dev, "out of memory\n");
                count = -ENOMEM;