ソースを参照

qcacld-3.0: Fix uninitialized return variables

Current code has return variables that are declared but not initialized.
To fix this, add initialization with a default value on declaration.

Change-Id: I62a69892f031351036417a77998d13a38bd41420
CRs-Fixed: 3273478
Mohammed Ahmed 2 年 前
コミット
e3bca1b2a1
2 ファイル変更2 行追加2 行削除
  1. 1 1
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 1 1
      core/hdd/src/wlan_hdd_main.c

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -20126,7 +20126,7 @@ static int wlan_hdd_add_key_all_mlo_vdev(mac_handle_t mac_handle,
 	struct wlan_objmgr_vdev *wlan_vdev_list[WLAN_UMAC_MLO_MAX_VDEVS];
 	struct wlan_objmgr_peer *peer;
 	struct qdf_mac_addr peer_mac;
-	int errno;
+	int errno = 0;
 	uint16_t link, vdev_count = 0;
 	uint8_t vdev_id;
 

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -3147,7 +3147,7 @@ static int hdd_start_link_adapter(struct hdd_adapter *sta_adapter)
 static int hdd_stop_link_adapter(struct hdd_context *hdd_ctx,
 				 struct hdd_adapter *sta_adapter)
 {
-	int i, ret;
+	int i, ret = 0;
 	struct hdd_mlo_adapter_info *mlo_adapter_info;
 	struct hdd_adapter *link_adapter;