Skip to contentSkip to conversation

ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk()

PATCH In review Dan Carpenter 2 participants 2 messages Jan 11, 2022 – Jan 17, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk()

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")
---
 drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/qmi.c +1 -1
index 65d3c6ba35ae..cf9f4ba75e03 100644
@@ -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);
Signature · 1 line
2.20.1
#1 lore raw
Quoted 6 lines · Dan Carpenter

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

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

c9b41832dc08 ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk()

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/20220111071445.GA11243@kili/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches