diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-08-21 17:39:30 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2016-08-23 07:36:43 +0300 |
commit | f4e1f9bb3498c0a9a3b92815f2ea64650eac1715 (patch) | |
tree | 833502ccca479bfc263414390e266df61f083ae4 /drivers/remoteproc | |
parent | aed361adca9ff1d828843f3afc5d9140a2fa410d (diff) | |
download | linux-f4e1f9bb3498c0a9a3b92815f2ea64650eac1715.tar.xz |
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; }; |