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: 10248623 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 9418B60211 for ; Wed, 28 Feb 2018 16:38:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 885CA2872A for ; Wed, 28 Feb 2018 16:38:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CED928738; Wed, 28 Feb 2018 16:38:05 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 112072872A for ; Wed, 28 Feb 2018 16:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=SHPdvv3u1agEX8ylBpm3FtOAdIwQ+K3HXC32fKjiEuo=; b=jLkvwkH6CX92QUsHPGQO7gsiPt MGv+ATxAfHBsmSQ55682nOeqEB2MayKMfXRv1vf2LI5zN0mc0u3+qa+f4tSySZZ+8GNA/5a8TuNbI 0v4kMBIiR4awBnG/TfRQBb3p0KJW6tC69EZjqLT4+6B901caEIk370YjZewJBVnrmyNYKO469etc4 /o8lI4zL3pMyax0mLH8olrmxsDyBKBsEnYR/S52JnvPt52gB1R5vL5Nkr8UNE8BH4tSb0F91u81wY HnNiJql/mGHWJhRs67znif0QI2OX8OgNj+HRCeuDbx0CCcZI85GFcYRng3pCPCaG8z3ON2YmGj72o QQNmvzyQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1er4js-0003Qg-BQ; Wed, 28 Feb 2018 16:37:56 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1er4hu-0002RW-R6 for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2018 16:36:26 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180228_083555_859188_3A97D78E X-CRM114-Status: GOOD ( 10.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Jason Cooper , Antoine Tenart , Gregory CLEMENT , Omri Itach , Nadav Haklai , Shadi Ammouri , Igal Liberman , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , Marcin Wojtas , Hanna Hawa , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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; }