Commit c6b69bf1 authored by Wei Yongjun's avatar Wei Yongjun Committed by Santosh Shilimkar

soc: ti: omap-prm: fix return value check in omap_prm_probe()

In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: 3e99cb21 ("soc: ti: add initial PRM driver with reset control support")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
parent 5478f912
......@@ -375,8 +375,8 @@ static int omap_prm_probe(struct platform_device *pdev)
prm->data = data;
prm->base = devm_ioremap_resource(&pdev->dev, res);
if (!prm->base)
return -ENOMEM;
if (IS_ERR(prm->base))
return PTR_ERR(prm->base);
return omap_prm_reset_init(pdev, prm);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment