From patchwork Wed Feb 10 03:16:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Bin X-Patchwork-Id: 381203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2F42C433DB for ; Wed, 10 Feb 2021 03:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A473A64E53 for ; Wed, 10 Feb 2021 03:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229710AbhBJD1y (ORCPT ); Tue, 9 Feb 2021 22:27:54 -0500 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:6843 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbhBJD1y (ORCPT ); Tue, 9 Feb 2021 22:27:54 -0500 X-Greylist: delayed 635 seconds by postgrey-1.27 at vger.kernel.org; Tue, 09 Feb 2021 22:27:53 EST Received: from spf.mail.chinamobile.com (unknown[172.16.121.11]) by rmmx-syy-dmz-app02-12002 (RichMail) with SMTP id 2ee2602350070c8-30d05; Wed, 10 Feb 2021 11:16:24 +0800 (CST) X-RM-TRANSID: 2ee2602350070c8-30d05 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.112.105.130]) by rmsmtp-syy-appsvr06-12006 (RichMail) with SMTP id 2ee66023500448f-68b16; Wed, 10 Feb 2021 11:16:23 +0800 (CST) X-RM-TRANSID: 2ee66023500448f-68b16 From: Tang Bin To: clabbe@baylibre.com, herbert@gondor.apana.org.au, davem@davemloft.net Cc: linux-crypto@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Tang Bin Subject: [PATCH] crypto: amlogic - Fix unnecessary check in meson_crypto_probe() Date: Wed, 10 Feb 2021 11:16:37 +0800 Message-Id: <20210210031637.19408-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 --- drivers/crypto/amlogic/amlogic-gxl-core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c index 466552acb..468a16f62 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -229,9 +229,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;