kirkwood: switch to 3.14
[openwrt.git] / target / linux / kirkwood / patches-3.10 / 0008-pci-mvebu-fix-return-value-check-in-mvebu_pcie_probe.patch
1 From 3ad3d38d36c51b45668708a42f67b07fc87a53e3 Mon Sep 17 00:00:00 2001
2 From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
3 Date: Mon, 27 May 2013 11:38:41 +0800
4 Subject: [PATCH 08/29] pci: mvebu: fix return value check in
5  mvebu_pcie_probe()
6
7 In case of error, function of_clk_get_by_name() returns
8 ERR_PTR() never returns NULL. The NULL test in the return
9 value check should be replaced with IS_ERR().
10
11 Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
12 Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13 Signed-off-by: Jason Cooper <jason@lakedaemon.net>
14 ---
15  drivers/pci/host/pci-mvebu.c | 2 +-
16  1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/pci/host/pci-mvebu.c
19 +++ b/drivers/pci/host/pci-mvebu.c
20 @@ -828,7 +828,7 @@ static int __init mvebu_pcie_probe(struc
21                 }
22  
23                 port->clk = of_clk_get_by_name(child, NULL);
24 -               if (!port->clk) {
25 +               if (IS_ERR(port->clk)) {
26                         dev_err(&pdev->dev, "PCIe%d.%d: cannot get clock\n",
27                                port->port, port->lane);
28                         iounmap(port->base);