ath10k: fix copy-paste error in ath10k_qmi_setup_msa_resources()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 16 Oct 2018 02:35:16 +0000 (02:35 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 5 Nov 2018 10:12:15 +0000 (12:12 +0200)
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>
drivers/net/wireless/ath/ath10k/qmi.c

index 56cb1831dcdf2dd2b4206b28e28a46bc6815cc21..c2cbb415971e39b05378dd700845bc870e22343c 100644 (file)
@@ -931,7 +931,7 @@ 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_pa) {
+               if (!qmi->msa_va) {
                        dev_err(dev, "failed to map memory region: %pa\n", &r.start);
                        return -EBUSY;
                }