drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c:612 iwl_mvm_mld_start_ap_ibss() warn: missing error code 'ret'
From: Dan Carpenter
Date: Sun Sep 15 2024 - 10:24:19 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d42f7708e27cc68d080ac9d3803d27e86821d775
commit: 3f3126515fbee0e364f8218f6171c091d8e2555e wifi: iwlwifi: mvm: add mvm-specific guard
config: csky-randconfig-r073-20240915 (https://download.01.org/0day-ci/archive/20240916/202409160031.caQ4LNOA-lkp@xxxxxxxxx/config)
compiler: csky-linux-gcc (GCC) 14.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
| Closes: https://lore.kernel.org/r/202409160031.caQ4LNOA-lkp@xxxxxxxxx/
smatch warnings:
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c:612 iwl_mvm_mld_start_ap_ibss() warn: missing error code 'ret'
vim +/ret +612 drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
f947b62c03b15d Miri Korenblit 2023-03-20 574 static int iwl_mvm_mld_start_ap_ibss(struct ieee80211_hw *hw,
cbce62a315f67e Miri Korenblit 2023-03-28 575 struct ieee80211_vif *vif,
cbce62a315f67e Miri Korenblit 2023-03-28 576 struct ieee80211_bss_conf *link_conf)
f947b62c03b15d Miri Korenblit 2023-03-20 577 {
f947b62c03b15d Miri Korenblit 2023-03-20 578 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
f947b62c03b15d Miri Korenblit 2023-03-20 579 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
f947b62c03b15d Miri Korenblit 2023-03-20 580 int ret;
f947b62c03b15d Miri Korenblit 2023-03-20 581
3f3126515fbee0 Johannes Berg 2024-05-12 582 guard(mvm)(mvm);
bde2f9b420f692 Mukesh Sisodiya 2024-04-16 583
bde2f9b420f692 Mukesh Sisodiya 2024-04-16 584 if (vif->type == NL80211_IFTYPE_AP)
bde2f9b420f692 Mukesh Sisodiya 2024-04-16 585 iwl_mvm_send_ap_tx_power_constraint_cmd(mvm, vif, link_conf);
bde2f9b420f692 Mukesh Sisodiya 2024-04-16 586
36cf537798cb6c Gregory Greenman 2023-03-28 587 /* Send the beacon template */
36cf537798cb6c Gregory Greenman 2023-03-28 588 ret = iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, link_conf);
36cf537798cb6c Gregory Greenman 2023-03-28 589 if (ret)
3f3126515fbee0 Johannes Berg 2024-05-12 590 return ret;
36cf537798cb6c Gregory Greenman 2023-03-28 591
bf976c814c864e Johannes Berg 2023-03-28 592 /* the link should be already activated when assigning chan context */
bf976c814c864e Johannes Berg 2023-03-28 593 ret = iwl_mvm_link_changed(mvm, vif, link_conf,
bf976c814c864e Johannes Berg 2023-03-28 594 LINK_CONTEXT_MODIFY_ALL &
bf976c814c864e Johannes Berg 2023-03-28 595 ~LINK_CONTEXT_MODIFY_ACTIVE,
f947b62c03b15d Miri Korenblit 2023-03-20 596 true);
f947b62c03b15d Miri Korenblit 2023-03-20 597 if (ret)
3f3126515fbee0 Johannes Berg 2024-05-12 598 return ret;
f947b62c03b15d Miri Korenblit 2023-03-20 599
62e0ccb2170e7a Gregory Greenman 2023-03-28 600 ret = iwl_mvm_mld_add_mcast_sta(mvm, vif, link_conf);
f947b62c03b15d Miri Korenblit 2023-03-20 601 if (ret)
3f3126515fbee0 Johannes Berg 2024-05-12 602 return ret;
f947b62c03b15d Miri Korenblit 2023-03-20 603
f947b62c03b15d Miri Korenblit 2023-03-20 604 /* Send the bcast station. At this stage the TBTT and DTIM time
f947b62c03b15d Miri Korenblit 2023-03-20 605 * events are added and applied to the scheduler
f947b62c03b15d Miri Korenblit 2023-03-20 606 */
62e0ccb2170e7a Gregory Greenman 2023-03-28 607 ret = iwl_mvm_mld_add_bcast_sta(mvm, vif, link_conf);
f947b62c03b15d Miri Korenblit 2023-03-20 608 if (ret)
f947b62c03b15d Miri Korenblit 2023-03-20 609 goto out_rm_mcast;
f947b62c03b15d Miri Korenblit 2023-03-20 610
f947b62c03b15d Miri Korenblit 2023-03-20 611 if (iwl_mvm_start_ap_ibss_common(hw, vif, &ret))
f947b62c03b15d Miri Korenblit 2023-03-20 @612 goto out_failed;
ret = iwl_mvm_start_ap_ibss_common()
if (ret)
f947b62c03b15d Miri Korenblit 2023-03-20 613
f947b62c03b15d Miri Korenblit 2023-03-20 614 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */
f947b62c03b15d Miri Korenblit 2023-03-20 615 if (vif->p2p && mvm->p2p_device_vif)
f947b62c03b15d Miri Korenblit 2023-03-20 616 iwl_mvm_mld_mac_ctxt_changed(mvm, mvm->p2p_device_vif, false);
f947b62c03b15d Miri Korenblit 2023-03-20 617
f947b62c03b15d Miri Korenblit 2023-03-20 618 iwl_mvm_bt_coex_vif_change(mvm);
f947b62c03b15d Miri Korenblit 2023-03-20 619
f947b62c03b15d Miri Korenblit 2023-03-20 620 /* we don't support TDLS during DCM */
f947b62c03b15d Miri Korenblit 2023-03-20 621 if (iwl_mvm_phy_ctx_count(mvm) > 1)
f947b62c03b15d Miri Korenblit 2023-03-20 622 iwl_mvm_teardown_tdls_peers(mvm);
f947b62c03b15d Miri Korenblit 2023-03-20 623
fd940de72d493c Avraham Stern 2023-06-12 624 iwl_mvm_ftm_restart_responder(mvm, vif, link_conf);
f947b62c03b15d Miri Korenblit 2023-03-20 625
3f3126515fbee0 Johannes Berg 2024-05-12 626 return 0;
f947b62c03b15d Miri Korenblit 2023-03-20 627
f947b62c03b15d Miri Korenblit 2023-03-20 628 out_failed:
f947b62c03b15d Miri Korenblit 2023-03-20 629 iwl_mvm_power_update_mac(mvm);
f947b62c03b15d Miri Korenblit 2023-03-20 630 mvmvif->ap_ibss_active = false;
62e0ccb2170e7a Gregory Greenman 2023-03-28 631 iwl_mvm_mld_rm_bcast_sta(mvm, vif, link_conf);
f947b62c03b15d Miri Korenblit 2023-03-20 632 out_rm_mcast:
62e0ccb2170e7a Gregory Greenman 2023-03-28 633 iwl_mvm_mld_rm_mcast_sta(mvm, vif, link_conf);
f947b62c03b15d Miri Korenblit 2023-03-20 634 return ret;
f947b62c03b15d Miri Korenblit 2023-03-20 635 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki