PCI: tegra: Correctly handle return code of pm_runtime_get_sync()
Subsystems (4)
PATCH 1/1 PCI: tegra: Correctly handle return code of pm_runtime_get_sync()
pm_runtime_get_sync() returns the device's usage counter. This might be >0 if the device is already powered up or CONFIG_PM is disabled.
Abort probe function on real error only.
--- drivers/pci/controller/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/pci-tegra.c +1 -1
@@ -2798,7 +2798,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)pm_runtime_enable (pcie->dev); err =pm_runtime_get_sync (pcie->dev); -if (err) { +if (err <0 ) {dev_err (dev,"fail to enable pcie controller: %d\n" , err); goto teardown_msi; }
Signature · 1 line
2.17.1
Quoted 6 lines · David Engraf
pm_runtime_get_sync()returns the device's usage counter. This might be >0 if the device is already powered up orCONFIG_PMis disabled.Abort probe function on real error only.
Signed-off-by David Engraf <[email protected]>
Thanks for this, looks OK to me.
As this is a fix, can you add the following fixes tag?
And whilst doing that can you rename the subject to "PCI: tegra: Fix return value check of pm_runtime_get_sync" - it's slightly shorter and has the word fix in the title.
Thanks,
Andrew Murray
Quoted 20 lines
--- drivers/pci/controller/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/controller/pci-tegra.c +1
-1@@ -2798,7 +2798,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)pm_runtime_enable (pcie->dev); err =pm_runtime_get_sync (pcie->dev); -if (err) { +if (err <0 ) {dev_err (dev,"fail to enable pcie controller: %d\n" , err); goto teardown_msi; }Signature · 1 line
2.17.1
PATCH v2 1/1 PCI: tegra: Fix return value check of pm_runtime_get_sync
pm_runtime_get_sync() returns the device's usage counter. This might be >0 if the device is already powered up or CONFIG_PM is disabled.
Abort probe function on real error only.
--- drivers/pci/controller/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/pci-tegra.c +1 -1
@@ -2798,7 +2798,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)pm_runtime_enable (pcie->dev); err =pm_runtime_get_sync (pcie->dev); -if (err) { +if (err <0 ) {dev_err (dev,"fail to enable pcie controller: %d\n" , err); goto teardown_msi; }
Signature · 1 line
2.17.1
Re: [PATCH v2] PCI: tegra: Fix return value check of pm_runtime_get_sync
Quoted 7 lines · David Engraf
pm_runtime_get_sync()returns the device's usage counter. This might be >0 if the device is already powered up orCONFIG_PMis disabled.Abort probe function on real error only.
Fixes da76ba50963b ("PCI: tegra: Add power management support")Signed-off-by David Engraf <[email protected]>
Thanks for this - apologies my feedback wasn't as quick as your respin.
Quoted 20 lines
--- drivers/pci/controller/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/controller/pci-tegra.c +1
-1@@ -2798,7 +2798,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)pm_runtime_enable (pcie->dev); err =pm_runtime_get_sync (pcie->dev); -if (err) { +if (err <0 ) {dev_err (dev,"fail to enable pcie controller: %d\n" , err); goto teardown_msi; }Signature · 1 line
2.17.1
Re: [PATCH v2] PCI: tegra: Fix return value check of pm_runtime_get_sync
In reply to David EngrafQuoted 7 lines · David Engraf
pm_runtime_get_sync()returns the device's usage counter. This might be >0 if the device is already powered up orCONFIG_PMis disabled.Abort probe function on real error only.
Fixes da76ba50963b ("PCI: tegra: Add power management support")Signed-off-by David Engraf <[email protected]>
I added Andrew's ack and a stable tag for v4.17+. Also cc'd Manikanta, author of da76ba50963b.
I put this on my pci/host-tegra branch for v5.6 for now. Lorenzo may move this when he returns.
Quoted 20 lines
--- drivers/pci/controller/pci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/controller/pci-tegra.c +1
-1@@ -2798,7 +2798,7 @@ static int tegra_pcie_probe(struct platform_device *pdev)pm_runtime_enable (pcie->dev); err =pm_runtime_get_sync (pcie->dev); -if (err) { +if (err <0 ) {dev_err (dev,"fail to enable pcie controller: %d\n" , err); goto teardown_msi; }Signature · 1 line
2.17.1
Re: [PATCH v2] PCI: tegra: Fix return value check of pm_runtime_get_sync
Quoted 6 lines · Bjorn Helgaas
Quoted 5 lines · David Engraf
pm_runtime_get_sync()returns the device's usage counter. This might be >0 if the device is already powered up orCONFIG_PMis disabled.Abort probe function on real error only.
Quoted 8 lines
Quoted 2 lines
Fixes da76ba50963b ("PCI: tegra: Add power management support")Signed-off-by David Engraf <[email protected]>I added Andrew's ack and a stable tag for v4.17+. Also cc'd Manikanta, author of
da76ba50963b.I put this on my pci/host-tegra branch for v5.6 for now. Lorenzo may move this when he returns.
Hi Bjorn,
I could not find pci/host-tegra in your public repo, have you deleted it in the meanwhile ?
I am happy to merge it myself, asking to check if there is anything I am missing.
Thanks,
Lorenzo
Re: [PATCH v2] PCI: tegra: Fix return value check of pm_runtime_get_sync
Quoted 13 lines · Lorenzo Pieralisi
Quoted 12 lines · Bjorn Helgaas
Quoted 7 lines · David Engraf
pm_runtime_get_sync()returns the device's usage counter. This might be >0 if the device is already powered up orCONFIG_PMis disabled.Abort probe function on real error only.
Fixes da76ba50963b ("PCI: tegra: Add power management support")Signed-off-by David Engraf <[email protected]>I added Andrew's ack and a stable tag for v4.17+. Also cc'd Manikanta, author of
da76ba50963b.
Quoted 7 lines
Quoted 2 lines
I put this on my pci/host-tegra branch for v5.6 for now. Lorenzo may move this when he returns.
Hi Bjorn,
I could not find pci/host-tegra in your public repo, have you deleted it in the meanwhile ?
Welcome back, Lorenzo! Sorry, I forgot to push the pci/host-tegra branch. It has been in -next for a while, though. I pushed it now. Happy to drop the branch if you want to add more Tegra stuff, just let me know.
Bjorn
Re: [PATCH v2] PCI: tegra: Fix return value check of pm_runtime_get_sync
Quoted 19 lines · Bjorn Helgaas
Quoted 18 lines · Lorenzo Pieralisi
Quoted 6 lines · Bjorn Helgaas
Quoted 5 lines · David Engraf
pm_runtime_get_sync()returns the device's usage counter. This might be >0 if the device is already powered up orCONFIG_PMis disabled.Abort probe function on real error only.
Quoted 8 lines
Quoted 2 lines
Fixes da76ba50963b ("PCI: tegra: Add power management support")Signed-off-by David Engraf <[email protected]>I added Andrew's ack and a stable tag for v4.17+. Also cc'd Manikanta, author of
da76ba50963b.I put this on my pci/host-tegra branch for v5.6 for now. Lorenzo may move this when he returns.
Hi Bjorn,
Quoted 7 lines
Quoted 2 lines
I could not find pci/host-tegra in your public repo, have you deleted it in the meanwhile ?
Welcome back, Lorenzo! Sorry, I forgot to push the pci/host-tegra branch. It has been in -next for a while, though. I pushed it now. Happy to drop the branch if you want to add more Tegra stuff, just let me know.
Thank you, I will have to add at least another tegra patch so I think it is best to drop your branch, I applied this patch to my pci/tegra branch and pushed it out in the meanwhile.
Thanks,
Lorenzo