media: fsl-viu: use GFP_KERNEL
authorJulia Lawall <Julia.Lawall@inria.fr>
Thu, 10 Feb 2022 20:42:20 +0000 (21:42 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 22 Feb 2022 08:41:12 +0000 (09:41 +0100)
Platform_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/platform/fsl-viu.c

index a4bfa70..afc96f6 100644 (file)
@@ -1407,7 +1407,7 @@ static int viu_of_probe(struct platform_device *op)
        }
 
        /* Prepare our private structure */
-       viu_dev = devm_kzalloc(&op->dev, sizeof(struct viu_dev), GFP_ATOMIC);
+       viu_dev = devm_kzalloc(&op->dev, sizeof(struct viu_dev), GFP_KERNEL);
        if (!viu_dev) {
                dev_err(&op->dev, "Can't allocate private structure\n");
                ret = -ENOMEM;