From patchwork Wed Feb 28 16:35:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10248613 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0F33B60211 for ; Wed, 28 Feb 2018 16:35:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0057528DD5 for ; Wed, 28 Feb 2018 16:35:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E915B28DDC; Wed, 28 Feb 2018 16:35:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B0A928DD5 for ; Wed, 28 Feb 2018 16:35:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933151AbeB1Qfx (ORCPT ); Wed, 28 Feb 2018 11:35:53 -0500 Received: from mail.bootlin.com ([62.4.15.54]:42519 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933011AbeB1Qfp (ORCPT ); Wed, 28 Feb 2018 11:35:45 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 8D964207E4; Wed, 28 Feb 2018 17:35:42 +0100 (CET) Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 3D51D207EF; Wed, 28 Feb 2018 17:35:32 +0100 (CET) From: Gregory CLEMENT To: Bjorn Helgaas , Lorenzo Pieralisi , Thomas Petazzoni , linux-pci@vger.kernel.org Cc: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT , linux-arm-kernel@lists.infradead.org, Antoine Tenart , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , Nadav Haklai , Shadi Ammouri , Omri Itach , Hanna Hawa , Igal Liberman , Marcin Wojtas Subject: [PATCH v2 1/2] PCI: armada8k: Remove useless test before clk_disable_unprepare Date: Wed, 28 Feb 2018 17:35:29 +0100 Message-Id: <20180228163530.25389-2-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180228163530.25389-1-gregory.clement@bootlin.com> References: <20180228163530.25389-1-gregory.clement@bootlin.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: Gregory CLEMENT --- drivers/pci/dwc/pcie-armada8k.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/dwc/pcie-armada8k.c b/drivers/pci/dwc/pcie-armada8k.c index b587352f8b9f..f9b1aec25c5c 100644 --- a/drivers/pci/dwc/pcie-armada8k.c +++ b/drivers/pci/dwc/pcie-armada8k.c @@ -247,8 +247,7 @@ static int armada8k_pcie_probe(struct platform_device *pdev) return 0; fail: - if (!IS_ERR(pcie->clk)) - clk_disable_unprepare(pcie->clk); + clk_disable_unprepare(pcie->clk); return ret; }