From: Tang Bin Date: Wed, 10 Feb 2021 03:16:37 +0000 (+0800) Subject: crypto: amlogic - Fix unnecessary check in meson_crypto_probe() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9ae219b199314790180da30fce231317142770dc;p=linux.git crypto: amlogic - Fix unnecessary check in meson_crypto_probe() 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 Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c index 5bbeff433c8c0..6e7ae896717cd 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -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;