The return value from devm_memremap() is not checked correctly.
The test is done against a wrong variable. This patch fix it.
Fixes:
ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
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_pa) {
+ if (!qmi->msa_va) {
dev_err(dev, "failed to map memory region: %pa\n", &r.start);
return -EBUSY;
}