net: hso: Use GFP_KERNEL instead of GFP_ATOMIC when possible
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 14 Feb 2022 19:09:06 +0000 (20:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Feb 2022 14:34:29 +0000 (14:34 +0000)
hso_create_device() is only called from function that already use
GFP_KERNEL. And all the callers are called from the probe function.

So there is no need here to explicitly require a GFP_ATOMIC when
allocating memory.

Use GFP_KERNEL instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/hso.c

index f97813a..f8221a7 100644 (file)
@@ -2319,7 +2319,7 @@ static struct hso_device *hso_create_device(struct usb_interface *intf,
 {
        struct hso_device *hso_dev;
 
-       hso_dev = kzalloc(sizeof(*hso_dev), GFP_ATOMIC);
+       hso_dev = kzalloc(sizeof(*hso_dev), GFP_KERNEL);
        if (!hso_dev)
                return NULL;