crypto: amlogic - Fix unnecessary check in meson_crypto_probe()
authorTang Bin <tangbin@cmss.chinamobile.com>
Wed, 10 Feb 2021 03:16:37 +0000 (11:16 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 7 Mar 2021 04:13:14 +0000 (15:13 +1100)
The function meson_crypto_probe() is only called with an openfirmware
platform device. Therefore there is no need to check that the passed
in device is NULL.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/amlogic/amlogic-gxl-core.c

index 5bbeff433c8c09d03486e2f8956fa11789545ad8..6e7ae896717cd2a21600f4282fc27145c3e18da3 100644 (file)
@@ -217,9 +217,6 @@ static int meson_crypto_probe(struct platform_device *pdev)
        struct meson_dev *mc;
        int err, i;
 
-       if (!pdev->dev.of_node)
-               return -ENODEV;
-
        mc = devm_kzalloc(&pdev->dev, sizeof(*mc), GFP_KERNEL);
        if (!mc)
                return -ENOMEM;