The write_parport_reg_nonblock() function shouldn't sleep because it's
called with spinlocks held.

Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---

diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index b013001..248fda6 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -374,7 +374,7 @@ static int write_parport_reg_nonblock(struct 
mos7715_parport *mos_parport,
                kfree(urbtrack);
                return -ENOMEM;
        }
-       urbtrack->setup = kmalloc(sizeof(*urbtrack->setup), GFP_KERNEL);
+       urbtrack->setup = kmalloc(sizeof(*urbtrack->setup), GFP_ATOMIC);
        if (!urbtrack->setup) {
                usb_free_urb(urbtrack->urb);
                kfree(urbtrack);
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to