diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-26 23:38:41 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-05-27 11:51:56 -0400 |
commit | 3d9939c92efdd4ced672b94994959ca71b141cb8 (patch) | |
tree | defed74e4a163028c18126cba28cd649e2a14f52 | |
parent | bda7aabd6d9a473f14c94280d8dc6d2d9a299479 (diff) |
pci: mvebu: fix return value check in mvebu_pcie_probe()
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>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r-- | drivers/pci/host/pci-mvebu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index ad1c46bb8b1d..9236ac0bd17b 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) | |||
828 | } | 828 | } |
829 | 829 | ||
830 | port->clk = of_clk_get_by_name(child, NULL); | 830 | port->clk = of_clk_get_by_name(child, NULL); |
831 | if (!port->clk) { | 831 | if (IS_ERR(port->clk)) { |
832 | dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n", | 832 | dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n", |
833 | port->port, port->lane); | 833 | port->port, port->lane); |
834 | iounmap(port->base); | 834 | iounmap(port->base); |