* [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe()
@ 2013-09-29 2:29 Wei Yongjun
2013-10-01 1:33 ` Jingoo Han
2013-10-04 22:50 ` Bjorn Helgaas
0 siblings, 2 replies; 5+ messages in thread
From: Wei Yongjun @ 2013-09-29 2:29 UTC (permalink / raw)
To: bhelgaas, kgene.kim, grant.likely, rob.herring, jg1.han, tgih.jun
Cc: yongjun_wei, linux-pci, linux-arm-kernel, linux-samsung-soc
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing clk_disable_unprepare() before return
from exynos_pcie_probe() in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/pci/host/pci-exynos.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
index 94e096b..e25598a 100644
--- a/drivers/pci/host/pci-exynos.c
+++ b/drivers/pci/host/pci-exynos.c
@@ -487,18 +487,24 @@ static int __init exynos_pcie_probe(struct platform_device *pdev)
elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
exynos_pcie->elbi_base = devm_ioremap_resource(&pdev->dev, elbi_base);
- if (IS_ERR(exynos_pcie->elbi_base))
- return PTR_ERR(exynos_pcie->elbi_base);
+ if (IS_ERR(exynos_pcie->elbi_base)) {
+ ret = PTR_ERR(exynos_pcie->elbi_base);
+ goto fail_bus_clk;
+ }
phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
exynos_pcie->phy_base = devm_ioremap_resource(&pdev->dev, phy_base);
- if (IS_ERR(exynos_pcie->phy_base))
- return PTR_ERR(exynos_pcie->phy_base);
+ if (IS_ERR(exynos_pcie->phy_base)) {
+ ret = PTR_ERR(exynos_pcie->phy_base);
+ goto fail_bus_clk;
+ }
block_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
exynos_pcie->block_base = devm_ioremap_resource(&pdev->dev, block_base);
- if (IS_ERR(exynos_pcie->block_base))
- return PTR_ERR(exynos_pcie->block_base);
+ if (IS_ERR(exynos_pcie->block_base)) {
+ ret = PTR_ERR(exynos_pcie->block_base);
+ goto fail_bus_clk;
+ }
ret = add_pcie_port(pp, pdev);
if (ret < 0)
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe()
2013-09-29 2:29 [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe() Wei Yongjun
@ 2013-10-01 1:33 ` Jingoo Han
2013-10-01 13:49 ` Sylwester Nawrocki
2013-10-04 22:50 ` Bjorn Helgaas
1 sibling, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2013-10-01 1:33 UTC (permalink / raw)
To: 'Bjorn Helgaas', 'Wei Yongjun'
Cc: 'Kukjin Kim', linux-pci, linux-arm-kernel,
linux-samsung-soc, 'Grant Likely', 'Rob Herring',
'Seungwon Jeon', 'Wei Yongjun',
'Jingoo Han'
On Sunday, September 29, 2013 11:29 AM, Wei Yongjun wrote:
>
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing clk_disable_unprepare() before return
> from exynos_pcie_probe() in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jingoo Han <jg1.han@samsung.com>
However, the commit name should be fixed as below:
[PATCH] PCI: exynos: use missing clk_disable_unprepare() on error in exynos_pcie_probe()
Best regards,
Jingoo Han
> ---
> drivers/pci/host/pci-exynos.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe()
2013-10-01 1:33 ` Jingoo Han
@ 2013-10-01 13:49 ` Sylwester Nawrocki
2013-10-01 23:44 ` Jingoo Han
0 siblings, 1 reply; 5+ messages in thread
From: Sylwester Nawrocki @ 2013-10-01 13:49 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Bjorn Helgaas', 'Wei Yongjun',
'Kukjin Kim', linux-pci, linux-arm-kernel,
linux-samsung-soc, 'Grant Likely', 'Rob Herring',
'Seungwon Jeon', 'Wei Yongjun'
On 10/01/2013 03:33 AM, Jingoo Han wrote:
> On Sunday, September 29, 2013 11:29 AM, Wei Yongjun wrote:
>>
>> From: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
>>
>> Add the missing clk_disable_unprepare() before return
>> from exynos_pcie_probe() in the error handling case.
>>
>> Signed-off-by: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
>
> Acked-by: Jingoo Han<jg1.han@samsung.com>
>
> However, the commit name should be fixed as below:
> [PATCH] PCI: exynos: use missing clk_disable_unprepare() on error in exynos_pcie_probe()
Perhaps just:
"PCI: exynos: Add missing clk_disable_unprepare() on error path
How can something that is missing be used ? :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe()
2013-10-01 13:49 ` Sylwester Nawrocki
@ 2013-10-01 23:44 ` Jingoo Han
0 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2013-10-01 23:44 UTC (permalink / raw)
To: 'Sylwester Nawrocki'
Cc: 'Bjorn Helgaas', 'Wei Yongjun',
'Kukjin Kim', linux-pci, linux-arm-kernel,
linux-samsung-soc, 'Grant Likely', 'Rob Herring',
'Seungwon Jeon', 'Wei Yongjun',
'Jingoo Han'
On Tuesday, October 01, 2013 10:49 PM, Sylwester Nawrocki wrote:
> On 10/01/2013 03:33 AM, Jingoo Han wrote:
> > On Sunday, September 29, 2013 11:29 AM, Wei Yongjun wrote:
> >>
> >> From: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
> >>
> >> Add the missing clk_disable_unprepare() before return
> >> from exynos_pcie_probe() in the error handling case.
> >>
> >> Signed-off-by: Wei Yongjun<yongjun_wei@trendmicro.com.cn>
> >
> > Acked-by: Jingoo Han<jg1.han@samsung.com>
> >
> > However, the commit name should be fixed as below:
> > [PATCH] PCI: exynos: use missing clk_disable_unprepare() on error in exynos_pcie_probe()
>
> Perhaps just:
>
> "PCI: exynos: Add missing clk_disable_unprepare() on error path
>
> How can something that is missing be used ? :)
Hi Sylwester Nawrocki,
OK, I see.
The following looks good, as you mentioned.
[PATCH] PCI: exynos: Add missing clk_disable_unprepare() on error path
Thank you for your comment. :-)
Best regards,
Jingoo Han
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe()
2013-09-29 2:29 [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe() Wei Yongjun
2013-10-01 1:33 ` Jingoo Han
@ 2013-10-04 22:50 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2013-10-04 22:50 UTC (permalink / raw)
To: Wei Yongjun
Cc: kgene.kim, grant.likely, rob.herring, jg1.han, tgih.jun,
yongjun_wei, linux-pci, linux-arm-kernel, linux-samsung-soc,
Sylwester Nawrocki
On Sun, Sep 29, 2013 at 10:29:11AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing clk_disable_unprepare() before return
> from exynos_pcie_probe() in the error handling case.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Applied with Jingoo's ack and Sylwester's subject line to
pci/host-exynos. Thanks!
Bjorn
> ---
> drivers/pci/host/pci-exynos.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
> index 94e096b..e25598a 100644
> --- a/drivers/pci/host/pci-exynos.c
> +++ b/drivers/pci/host/pci-exynos.c
> @@ -487,18 +487,24 @@ static int __init exynos_pcie_probe(struct platform_device *pdev)
>
> elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> exynos_pcie->elbi_base = devm_ioremap_resource(&pdev->dev, elbi_base);
> - if (IS_ERR(exynos_pcie->elbi_base))
> - return PTR_ERR(exynos_pcie->elbi_base);
> + if (IS_ERR(exynos_pcie->elbi_base)) {
> + ret = PTR_ERR(exynos_pcie->elbi_base);
> + goto fail_bus_clk;
> + }
>
> phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> exynos_pcie->phy_base = devm_ioremap_resource(&pdev->dev, phy_base);
> - if (IS_ERR(exynos_pcie->phy_base))
> - return PTR_ERR(exynos_pcie->phy_base);
> + if (IS_ERR(exynos_pcie->phy_base)) {
> + ret = PTR_ERR(exynos_pcie->phy_base);
> + goto fail_bus_clk;
> + }
>
> block_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> exynos_pcie->block_base = devm_ioremap_resource(&pdev->dev, block_base);
> - if (IS_ERR(exynos_pcie->block_base))
> - return PTR_ERR(exynos_pcie->block_base);
> + if (IS_ERR(exynos_pcie->block_base)) {
> + ret = PTR_ERR(exynos_pcie->block_base);
> + goto fail_bus_clk;
> + }
>
> ret = add_pcie_port(pp, pdev);
> if (ret < 0)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-04 22:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29 2:29 [PATCH] PCI: exynos: missing clk_disable_unprepare() on error in exynos_pcie_probe() Wei Yongjun
2013-10-01 1:33 ` Jingoo Han
2013-10-01 13:49 ` Sylwester Nawrocki
2013-10-01 23:44 ` Jingoo Han
2013-10-04 22:50 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).