OSDN Git Service

crypto: ux500 - use GFP_KERNEL
authorJulia Lawall <Julia.Lawall@inria.fr>
Thu, 10 Feb 2022 20:42:18 +0000 (21:42 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 Feb 2022 05:21:09 +0000 (16:21 +1100)
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: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ux500/cryp/cryp_core.c
drivers/crypto/ux500/hash/hash_core.c

index 97277b7..5a57c9a 100644 (file)
@@ -1264,7 +1264,7 @@ static int ux500_cryp_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
 
        dev_dbg(dev, "[%s]", __func__);
-       device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_ATOMIC);
+       device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_KERNEL);
        if (!device_data) {
                ret = -ENOMEM;
                goto out;
index 51a6e1a..5157c11 100644 (file)
@@ -1658,7 +1658,7 @@ static int ux500_hash_probe(struct platform_device *pdev)
        struct hash_device_data *device_data;
        struct device           *dev = &pdev->dev;
 
-       device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_ATOMIC);
+       device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_KERNEL);
        if (!device_data) {
                ret = -ENOMEM;
                goto out;