From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-pci@vger.kernel.org
Cc: "Jason Cooper" <jason@lakedaemon.net>,
"Andrew Lunn" <andrew@lunn.ch>,
"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
"Gregory CLEMENT" <gregory.clement@bootlin.com>,
linux-arm-kernel@lists.infradead.org,
"Antoine Tenart" <antoine.tenart@bootlin.com>,
"Miquèl Raynal" <miquel.raynal@bootlin.com>,
"Nadav Haklai" <nadavh@marvell.com>,
"Shadi Ammouri" <shadi@marvell.com>,
"Omri Itach" <omrii@marvell.com>,
"Hanna Hawa" <hannah@marvell.com>,
"Igal Liberman" <igall@marvell.com>,
"Marcin Wojtas" <mw@semihalf.com>
Subject: [PATCH 1/2] PCI: armada8k: Remove useless test before clk_disable_unprepare
Date: Wed, 28 Feb 2018 15:47:03 +0100 [thread overview]
Message-ID: <20180228144704.12947-2-gregory.clement@bootlin.com> (raw)
In-Reply-To: <20180228144704.12947-1-gregory.clement@bootlin.com>
clk_disable_unprepare() already checks that the clock pointer is valid.
No need to test it before calling it.
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
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;
}
--
2.16.1
WARNING: multiple messages have this Message-ID (diff)
From: gregory.clement@bootlin.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] PCI: armada8k: Remove useless test before clk_disable_unprepare
Date: Wed, 28 Feb 2018 15:47:03 +0100 [thread overview]
Message-ID: <20180228144704.12947-2-gregory.clement@bootlin.com> (raw)
In-Reply-To: <20180228144704.12947-1-gregory.clement@bootlin.com>
clk_disable_unprepare() already checks that the clock pointer is valid.
No need to test it before calling it.
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
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;
}
--
2.16.1
next prev parent reply other threads:[~2018-02-28 14:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 14:47 [PATCH 0/2] PCI: armada8k: Fix clock resource for Armada 7K/8K Gregory CLEMENT
2018-02-28 14:47 ` Gregory CLEMENT
2018-02-28 14:47 ` Gregory CLEMENT [this message]
2018-02-28 14:47 ` [PATCH 1/2] PCI: armada8k: Remove useless test before clk_disable_unprepare Gregory CLEMENT
2018-02-28 14:47 ` [PATCH 2/2] PCI: armada8k: Fix clock resource by adding a register clock Gregory CLEMENT
2018-02-28 14:47 ` Gregory CLEMENT
2018-02-28 14:53 ` Thomas Petazzoni
2018-02-28 14:53 ` Thomas Petazzoni
2018-02-28 15:37 ` Gregory CLEMENT
2018-02-28 15:37 ` Gregory CLEMENT
2018-02-28 15:27 ` Russell King - ARM Linux
2018-02-28 15:27 ` Russell King - ARM Linux
2018-02-28 15:31 ` Gregory CLEMENT
2018-02-28 15:31 ` Gregory CLEMENT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180228144704.12947-2-gregory.clement@bootlin.com \
--to=gregory.clement@bootlin.com \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=bhelgaas@google.com \
--cc=hannah@marvell.com \
--cc=igall@marvell.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=miquel.raynal@bootlin.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=omrii@marvell.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=shadi@marvell.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.