[net-next] ath10k: fix copy-paste error in ath10k_qmi_setup_msa_resources()
diff mbox series

Message ID 1539657316-35629-1-git-send-email-weiyongjun1@huawei.com
State New
Headers show
Series
  • [net-next] ath10k: fix copy-paste error in ath10k_qmi_setup_msa_resources()
Related show

Commit Message

Wei Yongjun Oct. 16, 2018, 2:35 a.m. UTC
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>
---
 drivers/net/wireless/ath/ath10k/qmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Oct. 24, 2018, 8:38 a.m. UTC | #1
Wei Yongjun <weiyongjun1@huawei.com> writes:

> 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>

Please don't mark wireless patches for net-next, by default ath10k
patches go to ath-next branch of my ath.git tree. But no need to resend
because of this.
Kalle Valo Nov. 5, 2018, 10:12 a.m. UTC | #2
Wei Yongjun <weiyongjun1@huawei.com> wrote:

> 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>

Patch applied to ath-next branch of ath.git, thanks.

4ab7fd955e47 ath10k: fix copy-paste error in ath10k_qmi_setup_msa_resources()

Patch
diff mbox series

diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
index 56cb183..c2cbb41 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.c
+++ b/drivers/net/wireless/ath/ath10k/qmi.c
@@ -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;
 		}