]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: ath12k: initialize 'ret' in ath12k_dp_rxdma_ring_sel_config_wcn7850()
authorJeff Johnson <quic_jjohnson@quicinc.com>
Tue, 7 May 2024 10:45:03 +0000 (13:45 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 13 May 2024 14:14:40 +0000 (17:14 +0300)
smatch flagged the following issue:

drivers/net/wireless/ath/ath12k/dp_rx.c:4065 ath12k_dp_rxdma_ring_sel_config_wcn7850() error: uninitialized symbol 'ret'.

In ath12k_dp_rxdma_ring_sel_config_wcn7850() if it were ever the case
that ab->hw_params->num_rxdma_per_pdev was 0 then 'ret' would be
uninitialized when it is returned. This should never be the case, but
to be safe and to quiet smatch, add an initializer to the declaration
of 'ret'.

No functional changes, compile tested only.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240504-ath12k_dp_rxdma_ring_sel_config_wcn7850-ret-v1-2-44d2843a2857@quicinc.com
drivers/net/wireless/ath/ath12k/dp_rx.c

index e3ff14cd283f79e1565d35b0f3d998dda0f49d50..37205e894afee16d83769e421bdcba88565cde2d 100644 (file)
@@ -4004,7 +4004,7 @@ int ath12k_dp_rxdma_ring_sel_config_wcn7850(struct ath12k_base *ab)
        struct ath12k_dp *dp = &ab->dp;
        struct htt_rx_ring_tlv_filter tlv_filter = {0};
        u32 ring_id;
-       int ret;
+       int ret = 0;
        u32 hal_rx_desc_sz = ab->hal.hal_desc_sz;
        int i;