From patchwork Fri Nov 13 07:45:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Wang X-Patchwork-Id: 11902661 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,DKIMWL_WL_HIGH, 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=ham 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 D6FCFC388F7 for ; Fri, 13 Nov 2020 07:46:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5A44420738 for ; Fri, 13 Nov 2020 07:46:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vnvSHA5E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A44420738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=sxyYwPoRJWspFZ6+i1J0j+64BjZ0/klqFkwf9dJkWX4=; b=vnvSHA5EPSydrEdFCkNmhBZmLs BUmrJ3XPFGGqS4Sy6Lir2iatGqc/k3DekWEAEqIwieQk97iwdYvNahNqcHUCFG37LfzoNXiGrkYTT 1wuY1BU+JkgWVpaHIcBCD+4VJDdwQxZhO0lZ/Zk1l3x1FbGyucSffqxraFK8PBHAqVH2iNHfkwKxo kzma1DcwsSSOrmeLKUAJCsi8k0rMfL/xx0BlcoK3SJbztUiidHBmhCZYgI4oH0VDYaxJk6h48J7e7 dqxzdZyTbrbt2ZHc6LaVzcmnI9rdDMog3bKrRCEEq1fhlX3HblGOG54nkwLjp5kHBrAsU1ErHj+CD mSMJTqMQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdTmN-0007VE-6y; Fri, 13 Nov 2020 07:45:55 +0000 Received: from smtp25.cstnet.cn ([159.226.251.25] helo=cstnet.cn) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdTmJ-0007Tq-8e for linux-arm-kernel@lists.infradead.org; Fri, 13 Nov 2020 07:45:52 +0000 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-05 (Coremail) with SMTP id zQCowAC3ypylOa5fu3bMAA--.60550S2; Fri, 13 Nov 2020 15:45:42 +0800 (CST) From: Xu Wang To: a.zummo@towertech.it, alexandre.belloni@bootlin.com, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] rtc: brcmstb-waketimer: Remove redundant null check before clk_disable_unprepare Date: Fri, 13 Nov 2020 07:45:38 +0000 Message-Id: <20201113074538.65028-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.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I43ZEXa7IU8YhF7UUUUU== X-Originating-IP: [124.16.141.242] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCAsTA18J9x6ybQABsy X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201113_024551_802584_223B6A21 X-CRM114-Status: GOOD ( 10.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: Florian Fainelli --- drivers/rtc/rtc-brcmstb-waketimer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c index 4fee57c51280..375a9987a1d6 100644 --- a/drivers/rtc/rtc-brcmstb-waketimer.c +++ b/drivers/rtc/rtc-brcmstb-waketimer.c @@ -264,8 +264,7 @@ static int brcmstb_waketmr_probe(struct platform_device *pdev) unregister_reboot_notifier(&timer->reboot_notifier); err_clk: - if (timer->clk) - clk_disable_unprepare(timer->clk); + clk_disable_unprepare(timer->clk); return ret; }