ata: pata_mpc52xx: use GFP_KERNEL
authorJulia Lawall <Julia.Lawall@inria.fr>
Thu, 10 Feb 2022 20:42:19 +0000 (21:42 +0100)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Sat, 19 Feb 2022 02:18:43 +0000 (11:18 +0900)
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>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
drivers/ata/pata_mpc52xx.c

index c1b138d..a2a3a95 100644 (file)
@@ -736,7 +736,7 @@ static int mpc52xx_ata_probe(struct platform_device *op)
        }
 
        /* Prepare our private structure */
-       priv = devm_kzalloc(&op->dev, sizeof(*priv), GFP_ATOMIC);
+       priv = devm_kzalloc(&op->dev, sizeof(*priv), GFP_KERNEL);
        if (!priv) {
                rv = -ENOMEM;
                goto err1;