* [PATCH -next] pci: mvebu: fix return value check in mvebu_pcie_probe()
@ 2013-05-27 3:38 Wei Yongjun
2013-05-27 7:12 ` Thomas Petazzoni
2013-05-27 16:05 ` Jason Cooper
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-05-27 3:38 UTC (permalink / raw)
To: bhelgaas, grant.likely, rob.herring, jason, thomas.petazzoni
Cc: yongjun_wei, linux-pci, devicetree-discuss
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
In case of error, function of_clk_get_by_name() returns
ERR_PTR() never returns NULL. The NULL test in the return
value check should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/pci/host/pci-mvebu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 91106df..c8397c4 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -828,7 +828,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev)
}
port->clk = of_clk_get_by_name(child, NULL);
- if (!port->clk) {
+ if (IS_ERR(port->clk)) {
dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n",
port->port, port->lane);
iounmap(port->base);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] pci: mvebu: fix return value check in mvebu_pcie_probe()
2013-05-27 3:38 [PATCH -next] pci: mvebu: fix return value check in mvebu_pcie_probe() Wei Yongjun
@ 2013-05-27 7:12 ` Thomas Petazzoni
2013-05-27 16:05 ` Jason Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2013-05-27 7:12 UTC (permalink / raw)
To: Wei Yongjun
Cc: bhelgaas, grant.likely, rob.herring, jason, yongjun_wei,
linux-pci, devicetree-discuss
Dear Wei Yongjun,
On Mon, 27 May 2013 11:38:41 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> In case of error, function of_clk_get_by_name() returns
> ERR_PTR() never returns NULL. The NULL test in the return
> value check should be replaced with IS_ERR().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Jason, this needs to be in the mvebu/pcie branch, so I'll guess you
would have to rebase mvebu/pcie_bridge on top of it.
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] pci: mvebu: fix return value check in mvebu_pcie_probe()
2013-05-27 3:38 [PATCH -next] pci: mvebu: fix return value check in mvebu_pcie_probe() Wei Yongjun
2013-05-27 7:12 ` Thomas Petazzoni
@ 2013-05-27 16:05 ` Jason Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Jason Cooper @ 2013-05-27 16:05 UTC (permalink / raw)
To: Wei Yongjun
Cc: bhelgaas, grant.likely, rob.herring, thomas.petazzoni,
yongjun_wei, linux-pci, devicetree-discuss
All,
On Mon, May 27, 2013 at 11:38:41AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> In case of error, function of_clk_get_by_name() returns
> ERR_PTR() never returns NULL. The NULL test in the return
> value check should be replaced with IS_ERR().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/pci/host/pci-mvebu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to mvebu/pcie.
FYI: mvebu/pcie_bridge, and mvebu/pcie_kirkwood have been rebased on top
of this change.
thx,
Jason.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-27 16:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-27 3:38 [PATCH -next] pci: mvebu: fix return value check in mvebu_pcie_probe() Wei Yongjun
2013-05-27 7:12 ` Thomas Petazzoni
2013-05-27 16:05 ` Jason Cooper
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.