All of lore.kernel.org
 help / color / mirror / Atom feed
* re: iwlwifi: mvm: support sched scan if supported by the fw
@ 2016-05-03 12:03 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-05-03 12:03 UTC (permalink / raw)
  To: david.spinadel; +Cc: linux-wireless

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-03 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 12:03 iwlwifi: mvm: support sched scan if supported by the fw Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.