* [PATCH] ath11k: fix error handling in ath11k_qmi_assign_target_mem_chunk()
@ 2022-01-16 14:42 trix
2022-01-17 13:00 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2022-01-16 14:42 UTC (permalink / raw)
To: kvalo, davem, kuba, nathan, ndesaulniers, akolli
Cc: ath11k, linux-wireless, netdev, linux-kernel, llvm, Tom Rix
From: Tom Rix <trix@redhat.com>
Clang static analysis reports this problem
qmi.c:1935:5: warning: Undefined or garbage value returned to caller
return ret;
^~~~~~~~~~
ret is uninitialized. When of_parse_phandle() fails, garbage is
returned. So return -EINVAL.
Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices")
Signed-off-by: Tom Rix <trix@redhat.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 65d3c6ba35ae6..81b2304b1fdeb 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 -EINVAL;
}
ret = of_address_to_resource(hremote_node, 0, &res);
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: fix error handling in ath11k_qmi_assign_target_mem_chunk()
2022-01-16 14:42 [PATCH] ath11k: fix error handling in ath11k_qmi_assign_target_mem_chunk() trix
@ 2022-01-17 13:00 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-01-17 13:00 UTC (permalink / raw)
To: trix
Cc: davem, kuba, nathan, ndesaulniers, akolli, ath11k,
linux-wireless, netdev, linux-kernel, llvm, Tom Rix
trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> Clang static analysis reports this problem
> qmi.c:1935:5: warning: Undefined or garbage value returned to caller
> return ret;
> ^~~~~~~~~~
>
> ret is uninitialized. When of_parse_phandle() fails, garbage is
> returned. So return -EINVAL.
>
> Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices")
> Signed-off-by: Tom Rix <trix@redhat.com>
I just applied a fix from Dan:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=c9b41832dc08
Patch set to Superseded.
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220116144206.399385-1-trix@redhat.com/
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 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 14:42 [PATCH] ath11k: fix error handling in ath11k_qmi_assign_target_mem_chunk() trix
2022-01-17 13:00 ` 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).