Skip to contentSkip to conversation

iwlwifi: mvm: support sched scan if supported by the fw

DISCUSSION Dan Carpenter 1 participant 1 message May 3, 2016

lore
Share & tools
lore
#0 lore raw

Hello David Spinadel,

The patch 35a000b7c1bb: "iwlwifi: mvm: support sched scan if supported by the fw" from Aug 28, 2013, leads to the following static checker warning:

drivers/net/wireless/intel/iwlwifi/mvm/scan.c:572 iwl_mvm_lmac_scan_abort()
error: uninitialized symbol 'status'.

drivers/net/wireless/intel/iwlwifi/mvm/scan.c
560 static int iwl_mvm_lmac_scan_abort(struct iwl_mvm *mvm) 561 {
562 int ret;
563 struct iwl_host_cmd cmd = {
564 .id = SCAN_OFFLOAD_ABORT_CMD,
565 };
566 u32 status;
567
568 ret = iwl_mvm_send_cmd_status(mvm, &cmd, &status);
569 if (ret)
570 return ret;
571

   572          if (status != CAN_ABORT_STATUS) {
                    ^^^^^^

There is a "success" path in iwl_mvm_send_cmd_status() where we don't set status. It's commented inside the function.

573 /*

   574                   * The scan abort will return 1 for success or
   575                   * 2 for "failure".  A failure condition can be
   576                   * due to simply not being in an active scan which
   577                   * can occur if we send the scan abort before the
   578                   * microcode has notified us that a scan is completed.
   579                   */

580 IWL_DEBUG_SCAN(mvm, "SCAN OFFLOAD ABORT ret %d.\n", status);
581 ret = -ENOENT;
582 }
583
584 return ret;
585 }

regards,
dan carpenter