* [bug report] wifi: ath12k: counter leaks
@ 2023-02-16 14:00 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2023-02-16 14:00 UTC (permalink / raw)
To: quic_kvalo; +Cc: ath12k
Hello Kalle Valo,
The patch d889913205cf: "wifi: ath12k: driver for Qualcomm Wi-Fi 7
devices" from Nov 28, 2022, leads to the following Smatch static
checker warning:
drivers/net/wireless/ath/ath12k/mac.c:1031 ath12k_mac_monitor_start() warn: plus plus leak 'ar->num_started_vdevs'
drivers/net/wireless/ath/ath12k/mac.c:3173 ath12k_station_assoc() warn: plus plus leak 'arvif->num_legacy_stations'
drivers/net/wireless/ath/ath12k/mac.c:5087 ath12k_mac_op_add_interface() warn: plus plus leak 'ar->num_created_vdevs'
drivers/net/wireless/ath/ath12k/mac.c
1003 static int ath12k_mac_monitor_start(struct ath12k *ar)
1004 {
1005 struct cfg80211_chan_def *chandef = NULL;
1006 int ret;
1007
1008 lockdep_assert_held(&ar->conf_mutex);
1009
1010 if (ar->monitor_started)
1011 return 0;
1012
1013 ieee80211_iter_chan_contexts_atomic(ar->hw,
1014 ath12k_mac_get_any_chandef_iter,
1015 &chandef);
1016 if (!chandef)
1017 return 0;
1018
1019 ret = ath12k_mac_monitor_vdev_start(ar, ar->monitor_vdev_id, chandef);
1020 if (ret) {
1021 ath12k_warn(ar->ab, "failed to start monitor vdev: %d\n", ret);
1022 ath12k_mac_monitor_vdev_delete(ar);
1023 return ret;
1024 }
1025
1026 ar->monitor_started = true;
1027 ar->num_started_vdevs++;
1028 ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
If ath12k_dp_tx_htt_monitor_mode_ring_config() fails then this should
decrement ar->num_started_vdevs and set ->started = false
1029 ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac monitor started ret %d\n", ret);
1030
--> 1031 return ret;
1032 }
regards,
dan carpenter
--
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-16 14:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 14:00 [bug report] wifi: ath12k: counter leaks Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox