Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp11143561pxu; Thu, 31 Dec 2020 00:57:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyW1YBbvTsb71j7I/JsEmrFiS0q560E5kjtrVAqBOXvvJp11CIQcP9IQwUd8nFqPwAUK+S7 X-Received: by 2002:a17:906:c45a:: with SMTP id ck26mr53014682ejb.200.1609405042244; Thu, 31 Dec 2020 00:57:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609405042; cv=none; d=google.com; s=arc-20160816; b=f1Wn+4u5HuHAwBzYkFOMoUkKQ0kTWaP9bUnXgGrnMJUx6KM5zqnX0RBe0Hh89Wk0uI 3w/Mp7iBudORC2aAhw3/dLv7mMNIKhcaY9XRXgUsTSHbhZbP9Ff8OwFu0N42dh16RO/T XqH8GfE2wuDxWeCgcSECiNDwbrEiM+PmlRvrQdur4D2M9fFKgnEaAiHR6j7+KFepBJGe e/MRoQoFifcr/o7NVC+eCvUkjH6YsK+V4VoaKjYoy/Tpqz7fttNZwD0XwCPtHNMr7gzk xji4gRAhttlW6qyFMhTCCFrxrbPnwnFIXAoXY0QwwBvI7dujP9HRB7clS0117SxzuA1N 81wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=5rsmHXqq9ceeFehxCIkCfUprp1GXepkdlqkradNrmTQ=; b=sCdneuMJFtGRjASTxlr+EI54Lg+gBbYeuyohK7NuxQnpeH8BvWKASTRHIGqqHifhco 8bYqrW0VdywzpA+4I16CJPZrZ+04aJC9/+0ZGrkopvvKYqEsRw2+7r83tcD2784jNz2y 6gYFjAtGQSBpyxujPwWPHVv3spvHiTRUKYG2E6GvfL5X7ktHBXQ+oF9je789rUO1ZN+h 7i48BfLY19TICZMdmTf1P39RaH31O7zEwx+qASrNoA9XIlQ/sY1+Jrwx7tWwQQ6TNics sR/WiBI6bxcLovAjm2kCRvMdnSI9Aqg8kchz9OTdTFj65uKowTq+a0bAeQOtXCrwov+8 Sx0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si26571038edv.243.2020.12.31.00.56.59; Thu, 31 Dec 2020 00:57:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726531AbgLaIyd (ORCPT + 99 others); Thu, 31 Dec 2020 03:54:33 -0500 Received: from smtp21.cstnet.cn ([159.226.251.21]:36134 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726130AbgLaIyc (ORCPT ); Thu, 31 Dec 2020 03:54:32 -0500 Received: from localhost.localdomain (unknown [124.16.141.241]) by APP-01 (Coremail) with SMTP id qwCowABHThaFke1f1bhfAA--.41536S2; Thu, 31 Dec 2020 16:53:25 +0800 (CST) From: Xu Wang To: jic23@kernel.org, lars@metafoo.de, pmeerw@pmeerw.net, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, krzk@kernel.org, andy.shevchenko@gmail.com, bobo.shaobowang@huawei.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH] iio: adc: stm32-dfsdm: Remove redundant null check before clk_disable_unprepare Date: Thu, 31 Dec 2020 08:53:22 +0000 Message-Id: <20201231085322.24398-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-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UYxBIdaVFxhVjvj DU0xZFpf9x07jeApnUUUUU= X-Originating-IP: [124.16.141.241] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCQkHA102Z1ecAwAAsA Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ecause clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang --- drivers/iio/adc/stm32-dfsdm-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/adc/stm32-dfsdm-core.c b/drivers/iio/adc/stm32-dfsdm-core.c index 42a7377704a4..bb925a11c8ae 100644 --- a/drivers/iio/adc/stm32-dfsdm-core.c +++ b/drivers/iio/adc/stm32-dfsdm-core.c @@ -117,8 +117,7 @@ static void stm32_dfsdm_clk_disable_unprepare(struct stm32_dfsdm *dfsdm) { struct dfsdm_priv *priv = to_stm32_dfsdm_priv(dfsdm); - if (priv->aclk) - clk_disable_unprepare(priv->aclk); + clk_disable_unprepare(priv->aclk); clk_disable_unprepare(priv->clk); } -- 2.17.1