diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-08-21 14:39:30 +0000 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-08-22 21:36:43 -0700 |
commit | f4e1f9bb3498c0a9a3b92815f2ea64650eac1715 (patch) | |
tree | 833502ccca479bfc263414390e266df61f083ae4 /drivers/remoteproc | |
parent | aed361adca9ff1d828843f3afc5d9140a2fa410d (diff) | |
download | talos-obmc-linux-f4e1f9bb3498c0a9a3b92815f2ea64650eac1715.tar.gz talos-obmc-linux-f4e1f9bb3498c0a9a3b92815f2ea64650eac1715.zip |
remoteproc: qcom: wcnss: Fix return value check in wcnss_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().
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/qcom_wcnss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 14c458519f84..1917de7db91c 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -528,8 +528,8 @@ static int wcnss_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pmu"); mmio = devm_ioremap_resource(&pdev->dev, res); - if (!mmio) { - ret = -ENOMEM; + if (IS_ERR(mmio)) { + ret = PTR_ERR(mmio); goto free_rproc; }; |