phy: mvebu-cp110: checking for NULL instead of IS_ERR()
devm_ioremap_resource() never returns NULL, it only returns error
pointers so this test needs to be changed.
Fixes: d0438bd6aa
("phy: add the mvebu cp110 comphy driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
parent
17fb745d4a
commit
c1c7acac09
|
@ -586,8 +586,8 @@ static int mvebu_comphy_probe(struct platform_device *pdev)
|
||||||
return PTR_ERR(priv->regmap);
|
return PTR_ERR(priv->regmap);
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
priv->base = devm_ioremap_resource(&pdev->dev, res);
|
priv->base = devm_ioremap_resource(&pdev->dev, res);
|
||||||
if (!priv->base)
|
if (IS_ERR(priv->base))
|
||||||
return -ENOMEM;
|
return PTR_ERR(priv->base);
|
||||||
|
|
||||||
for_each_available_child_of_node(pdev->dev.of_node, child) {
|
for_each_available_child_of_node(pdev->dev.of_node, child) {
|
||||||
struct mvebu_comphy_lane *lane;
|
struct mvebu_comphy_lane *lane;
|
||||||
|
|
Loading…
Reference in New Issue