Search Linux Wireless

[bug report] wifi: iwlwifi: add iwlmld sub-driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Miri Korenblit,

The patch d1e879ec600f: "wifi: iwlwifi: add iwlmld sub-driver" from
Feb 16, 2025, leads to the following static checker warning:

	drivers/net/wireless/intel/iwlwifi/mld/d3.c:1232 iwl_mld_wait_d3_notif()
	error: uninitialized symbol 'd3_status'.

drivers/net/wireless/intel/iwlwifi/mld/d3.c
    1200 static int iwl_mld_wait_d3_notif(struct iwl_mld *mld,
    1201 				 struct iwl_mld_resume_data *resume_data,
    1202 				 bool with_wowlan)
    1203 {
    1204 	static const u16 wowlan_resume_notif[] = {
    1205 		WIDE_ID(PROT_OFFLOAD_GROUP, WOWLAN_INFO_NOTIFICATION),
    1206 		WIDE_ID(PROT_OFFLOAD_GROUP, WOWLAN_WAKE_PKT_NOTIFICATION),
    1207 		WIDE_ID(SCAN_GROUP, OFFLOAD_MATCH_INFO_NOTIF),
    1208 		WIDE_ID(PROT_OFFLOAD_GROUP, D3_END_NOTIFICATION)
    1209 	};
    1210 	static const u16 d3_resume_notif[] = {
    1211 		WIDE_ID(PROT_OFFLOAD_GROUP, D3_END_NOTIFICATION)
    1212 	};
    1213 	struct iwl_notification_wait wait_d3_notif;
    1214 	enum iwl_d3_status d3_status;
    1215 	int ret;
    1216 
    1217 	if (with_wowlan)
    1218 		iwl_init_notification_wait(&mld->notif_wait, &wait_d3_notif,
    1219 					   wowlan_resume_notif,
    1220 					   ARRAY_SIZE(wowlan_resume_notif),
    1221 					   iwl_mld_handle_d3_notif,
    1222 					   resume_data);
    1223 	else
    1224 		iwl_init_notification_wait(&mld->notif_wait, &wait_d3_notif,
    1225 					   d3_resume_notif,
    1226 					   ARRAY_SIZE(d3_resume_notif),
    1227 					   iwl_mld_handle_d3_notif,
    1228 					   resume_data);
    1229 
    1230 	ret = iwl_trans_d3_resume(mld->trans, &d3_status, false, false);
    1231 	if (ret || d3_status != IWL_D3_STATUS_ALIVE) {
--> 1232 		if (d3_status != IWL_D3_STATUS_ALIVE) {

This should be an if (!ret) test.  On this path d3_status could be
uninitialized.

    1233 			IWL_INFO(mld, "Device was reset during suspend\n");
    1234 			ret = -ENOENT;
    1235 		} else {
    1236 			IWL_ERR(mld, "Transport resume failed\n");
    1237 		}
    1238 		iwl_remove_notification(&mld->notif_wait, &wait_d3_notif);
    1239 		return ret;
    1240 	}
    1241 
    1242 	ret = iwl_wait_notification(&mld->notif_wait, &wait_d3_notif,
    1243 				    IWL_MLD_D3_NOTIF_TIMEOUT);
    1244 	if (ret)
    1245 		IWL_ERR(mld, "Couldn't get the d3 notif %d\n", ret);
    1246 
    1247 	if (resume_data->notif_handling_err)
    1248 		ret = -EIO;
    1249 
    1250 	return ret;
    1251 }

regards,
dan carpenter




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux