* [PATCH] ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk()
@ 2022-01-11 7:14 Dan Carpenter
2022-01-17 12:37 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-01-11 7:14 UTC (permalink / raw)
To: Kalle Valo, Anilkumar Kolli; +Cc: ath11k, linux-wireless, kernel-janitors
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>
---
drivers/net/wireless/ath/ath11k/qmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
index 65d3c6ba35ae..cf9f4ba75e03 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -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);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk()
2022-01-11 7:14 [PATCH] ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk() Dan Carpenter
@ 2022-01-17 12:37 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-01-17 12:37 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Anilkumar Kolli, ath11k, linux-wireless, kernel-janitors
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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>
Patch applied to ath-next branch of ath.git, thanks.
c9b41832dc08 ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk()
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220111071445.GA11243@kili/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-17 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-11 7:14 [PATCH] ath11k: fix error code in ath11k_qmi_assign_target_mem_chunk() Dan Carpenter
2022-01-17 12:37 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).