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: 3e99cb214f ("soc: ti: add initial PRM driver with reset control support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
This commit is contained in:
Wei Yongjun 2019-10-29 09:57:56 -07:00 committed by Santosh Shilimkar
parent 5478f912d2
commit c6b69bf143
1 changed files with 2 additions and 2 deletions

View File

@ -375,8 +375,8 @@ static int omap_prm_probe(struct platform_device *pdev)
prm->data = data; prm->data = data;
prm->base = devm_ioremap_resource(&pdev->dev, res); prm->base = devm_ioremap_resource(&pdev->dev, res);
if (!prm->base) if (IS_ERR(prm->base))
return -ENOMEM; return PTR_ERR(prm->base);
return omap_prm_reset_init(pdev, prm); return omap_prm_reset_init(pdev, prm);
} }