Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1956187pxu; Fri, 18 Dec 2020 01:54:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3DeDLEGNGAlkmrax2ETtDva2ETvgvwjR3I6Y7UcXbWReFZjXFheyPswZDkPMvg4Lf+1ni X-Received: by 2002:a17:907:961b:: with SMTP id gb27mr3124560ejc.313.1608285290195; Fri, 18 Dec 2020 01:54:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608285290; cv=none; d=google.com; s=arc-20160816; b=yiM8Ub/GJDI1Sr4afoxNQNXiM7ot9zr2KfdyNjbnXr30cZkzjOeAotWisUdpKVw4De Dp5kf+NLP2RODhR5MkGsRSQziwwi8UIItRnq/XLiYfDtmXAi0DeDfSbrsJNTsw7hd7pK XWZPj1P5wLqRh7YkeFvgGJot+/9AGv0ao8Ijal/SWzhp07DWUUlvWZEkJyRXQ4d4nZuZ I24FsWrW59RWtLiKgmhIJJm16lVQP75TOEizLm/BSnacf1S2PhQmGy9HeDq/wz25tr60 I3EYeNmxDBQvtPkX2NYfR9gC6JRgdRmCWk5oNf5KmRfDOZMVBngl/rSxcE1HYpSXr+MJ Mt+g== 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=bJQ8ABdtKpy9UzokrxAL1QeEFVaZBcb89s05CxEpYNQ=; b=dGcSLQ/nl/9vdjrDYvaTgwXwYvMATTrlWU+QFZeWNCt6nKeulFFISOuPFj+04yQMqv N7cjXJ/zyn+35ZReeQQirFVB7fHtUZJcpYT5ufNSvI7WKq0t53EGIPaebvsqVoTMGO3w /ZAnXctWN5+xMh/NLpN20di+1Y2nVtxMp8tybfcENAkmNJHSIk3l1/zVDLzOHAdb95YE WWhLbphcRlfs6kVnZgN1h6MJbVGXcOuTcuxiLupOcEWmUFn5CyCDekfYpkPlk2IgGdbV sFjZCOdkb2NtnhK+9UMEpOdvc824fcL85poQv0ixdnjP9WKu07w935YAYTjLpuljTThJ ncpw== 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 g2si4321692eji.656.2020.12.18.01.54.27; Fri, 18 Dec 2020 01:54:50 -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 S1732460AbgLRJro (ORCPT + 99 others); Fri, 18 Dec 2020 04:47:44 -0500 Received: from smtp25.cstnet.cn ([159.226.251.25]:54104 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728240AbgLRJro (ORCPT ); Fri, 18 Dec 2020 04:47:44 -0500 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-05 (Coremail) with SMTP id zQCowAC3p3CJetxf_O4SAA--.42642S2; Fri, 18 Dec 2020 17:46:50 +0800 (CST) From: Xu Wang To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, pmeerw@pmeerw.net, linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] iio: frequency: adf4350: Remove redundant null check before clk_disable_unprepare Date: Fri, 18 Dec 2020 09:46:47 +0000 Message-Id: <20201218094647.1386-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowAC3p3CJetxf_O4SAA--.42642S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFy8CFy8AFW3tr4UAFW5KFg_yoWDWrX_C3 W8urZ2gF4rur9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-kernel@vger.kernel.org Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang --- drivers/iio/frequency/adf4350.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index 82c050a3899d..1462a6a5bc6d 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -582,8 +582,7 @@ static int adf4350_probe(struct spi_device *spi) if (!IS_ERR(st->reg)) regulator_disable(st->reg); error_disable_clk: - if (clk) - clk_disable_unprepare(clk); + clk_disable_unprepare(clk); return ret; } @@ -599,8 +598,7 @@ static int adf4350_remove(struct spi_device *spi) iio_device_unregister(indio_dev); - if (st->clk) - clk_disable_unprepare(st->clk); + clk_disable_unprepare(st->clk); if (!IS_ERR(reg)) regulator_disable(reg); -- 2.17.1