提交 c1c7acac 编写于 作者: D Dan Carpenter 提交者: Kishon Vijay Abraham I

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: d0438bd6 ("phy: add the mvebu cp110 comphy driver")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
上级 17fb745d
......@@ -586,8 +586,8 @@ static int mvebu_comphy_probe(struct platform_device *pdev)
return PTR_ERR(priv->regmap);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_ioremap_resource(&pdev->dev, res);
if (!priv->base)
return -ENOMEM;
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
for_each_available_child_of_node(pdev->dev.of_node, child) {
struct mvebu_comphy_lane *lane;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册