staging: gdm7240: alloc_mux_rx() does not need GFP_ATOMIC
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Tue, 8 Oct 2013 20:50:15 +0000 (00:50 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2013 22:23:13 +0000 (15:23 -0700)
As far as alloc_mux_rx() is called from probe() only
there is no need in GFP_ATOMIC here.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_mux.c

index d63517c..3c89eaa 100644 (file)
@@ -96,12 +96,12 @@ static struct mux_rx *alloc_mux_rx(void)
 {
        struct mux_rx *r = NULL;
 
-       r = kzalloc(sizeof(struct mux_rx), GFP_ATOMIC);
+       r = kzalloc(sizeof(struct mux_rx), GFP_KERNEL);
        if (!r)
                return NULL;
 
-       r->urb = usb_alloc_urb(0, GFP_ATOMIC);
-       r->buf = kmalloc(MUX_RX_MAX_SIZE, GFP_ATOMIC);
+       r->urb = usb_alloc_urb(0, GFP_KERNEL);
+       r->buf = kmalloc(MUX_RX_MAX_SIZE, GFP_KERNEL);
        if (!r->urb || !r->buf) {
                usb_free_urb(r->urb);
                kfree(r->buf);