wifi: iwlwifi: mei: fix parameter passing to iwl_mei_alive_notif()
authorGregory Greenman <gregory.greenman@intel.com>
Wed, 23 Nov 2022 21:02:09 +0000 (23:02 +0200)
committerGregory Greenman <gregory.greenman@intel.com>
Mon, 28 Nov 2022 15:54:09 +0000 (17:54 +0200)
Pass true explicitly to iwl_mei_alive_notif() when we can be
sure that Alive notification was received. The issue was discovered
by Smatch.

Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/all/Y3uYUEFnMiBY2ABQ@kili/
Link: https://lore.kernel.org/r/20221123225313.83c2251055c1.Ia028357e7ab36dfc2abf85106a5926ee7893a408@changeid
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index 2f4c9e653e993a6b694fa5cca57ed77839434a2a..0a41cd0ab243b5a753f8f568a64fe81de51624ba 100644 (file)
@@ -418,7 +418,8 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
                return -EIO;
        }
 
-       iwl_mei_alive_notif(!ret);
+       /* if reached this point, Alive notification was received */
+       iwl_mei_alive_notif(true);
 
        ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait);
        if (ret) {