Skip to content

Commit ccb7bc5

Browse files
JuliaLawallmiquelraynal
authored andcommitted
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 <Julia.Lawall@inria.fr> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220210204223.104181-8-Julia.Lawall@inria.fr
1 parent d71dac3 commit ccb7bc5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mtd/devices/spear_smi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ static int spear_smi_probe(struct platform_device *pdev)
969969
goto err;
970970
}
971971

972-
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_ATOMIC);
972+
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
973973
if (!dev) {
974974
ret = -ENOMEM;
975975
goto err;

0 commit comments

Comments
 (0)