From: Julia Lawall Date: Thu, 10 Feb 2022 20:42:21 +0000 (+0100) Subject: mtd: spear_smi: use GFP_KERNEL X-Git-Tag: howlett/maple/20220722_2~914^2~10 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ccb7bc50177c5e94e0609126654abeb4f3b67819;p=users%2Fjedix%2Flinux-maple.git mtd: spear_smi: use GFP_KERNEL 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220210204223.104181-8-Julia.Lawall@inria.fr --- diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index 2e00862389dd1..24073518587fe 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -969,7 +969,7 @@ static int spear_smi_probe(struct platform_device *pdev) goto err; } - dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_ATOMIC); + dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); if (!dev) { ret = -ENOMEM; goto err;