mpt2sas: fix &&/|| confusion in _scsih_sas_device_status_change_event()
PATCH 19/26 mpt2sas: fix &&/|| confusion in _scsih_sas_device_status_change_event()
From: Roel Kluin <[email protected]>
Even if the ReasonCode is not INTERNAL_DEVICE_RESET nor CMP_DEVICE_RESET this still evaluates to true.
Signed-off-by Roel Kluin <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc Kashyap Desai <[email protected]>
Acked-by Eric Moore <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/mpt2sas/mpt2sas_scsih.c renamed from drivers/scsi/mpt2sas/mpt2sas_scsih.c~mpt2sas-fix-confusion-in-_scsih_sas_device_status_change_event +4 -4
@@ -4519,10 +4519,10 @@ _scsih_sas_device_status_change_event(st event_data);#endif -if (!(event_data->ReasonCode == -MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET && - event_data->ReasonCode == -MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET )) +if (event_data->ReasonCode != +MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET && + event_data->ReasonCode != +MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET )return ;spin_lock_irqsave (&ioc->sas_device_lock, flags);
_