ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 12 Jan 2022 08:15:11 +0000 (10:15 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 17 Jan 2022 12:37:28 +0000 (14:37 +0200)
The "ret" vairable is not set at this point.  It could be uninitialized
or zero.  The correct thing to return is -ENODEV.

Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220111071445.GA11243@kili
drivers/net/wireless/ath/ath11k/qmi.c

index 42c2ad3e36683d6c3df562215a616aa26d5b29d5..d0701e8eca9c0e439a548fa4d24c8280b9b28d64 100644 (file)
@@ -1932,7 +1932,7 @@ static int ath11k_qmi_assign_target_mem_chunk(struct ath11k_base *ab)
                        if (!hremote_node) {
                                ath11k_dbg(ab, ATH11K_DBG_QMI,
                                           "qmi fail to get hremote_node\n");
-                               return ret;
+                               return -ENODEV;
                        }
 
                        ret = of_address_to_resource(hremote_node, 0, &res);