From patchwork Thu Oct 29 08:25:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Wang X-Patchwork-Id: 310600 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,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 C2797C55178 for ; Thu, 29 Oct 2020 08:26:26 +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 C2E1C2076E for ; Thu, 29 Oct 2020 08:26:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Jag1rYbm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2E1C2076E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn 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 188C4167F; Thu, 29 Oct 2020 09:25:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 188C4167F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1603959982; bh=ymmw/VPBma7CTH4kF/YpY/EkpD7p/sdtC8kfYBWRnZ0=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Jag1rYbmv2sXHhjfCGfxyCGy7KKUx8VNKm0K7P8+z0cEBEm10OPes1ZcUOQCwDnZJ UMKyuvF7VTIfVvdAR0PnmNa+F0a7q1H60qu2/Sgtvk40sf+ZgnCWjo0npXHzPBZGBP XEeQ+05/IP5MTq+hWQHTQZirgMlcgAqPgA7QEajU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 62975F800FF; Thu, 29 Oct 2020 09:25:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C653F8020D; Thu, 29 Oct 2020 09:25:30 +0100 (CET) Received: from cstnet.cn (smtp25.cstnet.cn [159.226.251.25]) by alsa1.perex.cz (Postfix) with ESMTP id 64CF6F80095 for ; Thu, 29 Oct 2020 09:25:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 64CF6F80095 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-05 (Coremail) with SMTP id zQCowABnV1BtfJpfZ51KAA--.28505S2; Thu, 29 Oct 2020 16:25:18 +0800 (CST) From: Xu Wang To: peter.ujfalusi@ti.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Subject: [PATCH] ASoC: ti: davinci-evm: Remove redundant null check before clk_disable_unprepare Date: Thu, 29 Oct 2020 08:25:13 +0000 Message-Id: <20201029082513.28233-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowABnV1BtfJpfZ51KAA--.28505S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFy8CFy8Aw45GFW8AFWkJFb_yoW3KFg_Aw 1Fg393Wa4UZw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enThere: 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" Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Acked-by: Peter Ujfalusi --- sound/soc/ti/davinci-evm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c index 105e56ab9cdc..b043a0070d20 100644 --- a/sound/soc/ti/davinci-evm.c +++ b/sound/soc/ti/davinci-evm.c @@ -46,8 +46,7 @@ static void evm_shutdown(struct snd_pcm_substream *substream) struct snd_soc_card_drvdata_davinci *drvdata = snd_soc_card_get_drvdata(soc_card); - if (drvdata->mclk) - clk_disable_unprepare(drvdata->mclk); + clk_disable_unprepare(drvdata->mclk); } static int evm_hw_params(struct snd_pcm_substream *substream,