media: cx18: use GFP_KERNEL
authorJulia Lawall <Julia.Lawall@inria.fr>
Thu, 10 Feb 2022 20:42:16 +0000 (21:42 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 22 Feb 2022 08:41:12 +0000 (09:41 +0100)
Pci_driver probe functions aren't called with locks held
and thus don't need GFP_ATOMIC. Use GFP_KERNEL instead.

Problem found with Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/pci/cx18/cx18-driver.c

index 59497ba..1be9672 100644 (file)
@@ -899,7 +899,7 @@ static int cx18_probe(struct pci_dev *pci_dev,
                return -ENOMEM;
        }
 
-       cx = kzalloc(sizeof(*cx), GFP_ATOMIC);
+       cx = kzalloc(sizeof(*cx), GFP_KERNEL);
        if (!cx)
                return -ENOMEM;