iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
        }
 
-       mvm->last_ebs_successful = !ebs_status;
+       if (ebs_status)
+               mvm->last_ebs_successful = false;
 
        return 0;
 }
                       notif->ebs_status == IWL_SCAN_EBS_SUCCESS ?
                                "success" : "failed");
 
-       mvm->last_ebs_successful = !notif->ebs_status;
+       if (notif->ebs_status)
+               mvm->last_ebs_successful = false;
+
        mvm->scan_uid[uid_idx] = 0;
 
        if (!sched) {
 
        /*
         * Clear scan uid of scans that was aborted from above and completed
-        * in FW so the RX handler does nothing.
+        * in FW so the RX handler does nothing. Set last_ebs_successful here if
+        * needed.
         */
        scan_done->mvm->scan_uid[uid_idx] = 0;
 
+       if (notif->ebs_status)
+               scan_done->mvm->last_ebs_successful = false;
+
        return !iwl_mvm_find_scan_type(scan_done->mvm, scan_done->type);
 }