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>
This commit is contained in:
Wei Yongjun 2013-05-27 11:38:41 +08:00 committed by Jason Cooper
parent bda7aabd6d
commit 3d9939c92e
1 changed files with 1 additions and 1 deletions

View File

@ -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);