From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 AED97C3815B for ; Mon, 20 Apr 2020 14:25:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C6D6206DD for ; Mon, 20 Apr 2020 14:25:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="jl+rPrGT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C6D6206DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 925BE167F; Mon, 20 Apr 2020 16:24:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 925BE167F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1587392717; bh=IYneKBYRFwVoZYfmR3TdLC+JN7+YenlWe/LlmbtBVxE=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=jl+rPrGT/Ly23crsa+FL7BGf8axoMCJXGoyAbsLK/HZpeFBL+6+o+biNe33OHlovj DKx73psLHgIQbw3k9n7X7Fsmskxdo7Fq0HpAq4VcDe675xToQsiO6HsDQxb8Sbqrfh 55kliddN/GRG8NZhdrY+lbBKuKrGSfky5cOdBE/A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2DF23F8013E; Mon, 20 Apr 2020 16:24:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 96B45F801D9; Mon, 20 Apr 2020 16:24:25 +0200 (CEST) Received: from cmccmta1.chinamobile.com (cmccmta1.chinamobile.com [221.176.66.79]) by alsa1.perex.cz (Postfix) with ESMTP id 5CA43F800E7 for ; Mon, 20 Apr 2020 16:24:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5CA43F800E7 Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app03-12003 (RichMail) with SMTP id 2ee35e9db059e55-d7192; Mon, 20 Apr 2020 22:23:21 +0800 (CST) X-RM-TRANSID: 2ee35e9db059e55-d7192 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.1.173.179]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee25e9db056663-c7edf; Mon, 20 Apr 2020 22:23:21 +0800 (CST) X-RM-TRANSID: 2ee25e9db056663-c7edf From: Tang Bin To: broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, lgirdwood@gmail.com Subject: [PATCH] ASoC: mxs-saif: Avoid unnecessary check Date: Mon, 20 Apr 2020 22:25:09 +0800 Message-Id: <20200420142509.9728-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: alsa-devel@alsa-project.org, Shengju Zhang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tang Bin X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The function mxs_saif_probe() is only called with an openfirmware platform device. Therefore there is no need to check that it has an openfirmware node. Signed-off-by: Shengju Zhang Signed-off-by: Tang Bin --- sound/soc/mxs/mxs-saif.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 1e38ce858..64c095b91 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -736,9 +736,6 @@ static int mxs_saif_probe(struct platform_device *pdev) int irq, ret = 0; struct device_node *master; - if (!np) - return -EINVAL; - saif = devm_kzalloc(&pdev->dev, sizeof(*saif), GFP_KERNEL); if (!saif) return -ENOMEM; -- 2.20.1.windows.1