diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-12-20 09:53:41 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-12-20 19:05:19 +0200 |
commit | c28dcbce0592a1a7e32975e28bdd80e5d8d2cfa3 (patch) | |
tree | 7cc361a7a1189f6a48a129be20fe56a142f0df33 /drivers/net/wireless/ath/ath10k/qmi.c | |
parent | 8765967592875f1b4b20a8541a325045e5f75a36 (diff) |
ath10k: fix a NULL vs IS_ERR() check
The devm_memremap() function doesn't return NULLs, it returns error
pointers.
Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/qmi.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/qmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c index f0429bee35c2..37b3bd629f48 100644 --- a/drivers/net/wireless/ath/ath10k/qmi.c +++ b/drivers/net/wireless/ath/ath10k/qmi.c @@ -931,9 +931,9 @@ static int ath10k_qmi_setup_msa_resources(struct ath10k_qmi *qmi, u32 msa_size) qmi->msa_mem_size = resource_size(&r); qmi->msa_va = devm_memremap(dev, qmi->msa_pa, qmi->msa_mem_size, MEMREMAP_WT); - if (!qmi->msa_va) { + if (IS_ERR(qmi->msa_va)) { dev_err(dev, "failed to map memory region: %pa\n", &r.start); - return -EBUSY; + return PTR_ERR(qmi->msa_va); } } else { qmi->msa_va = dmam_alloc_coherent(dev, msa_size, |