Skip to content

Commit

Permalink
ata: pata_mpc52xx: use GFP_KERNEL
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Damien Le Moal committed Feb 19, 2022
1 parent 334bfa1 commit cf369e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/pata_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cf369e4

Please sign in to comment.