summaryrefslogtreecommitdiff
path: root/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
diff options
context:
space:
mode:
authorBryant G. Ly <bryantly@linux.vnet.ibm.com>2016-08-31 19:29:01 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-09-04 08:28:07 +0300
commitf6dbe38edf1ef4929847c90e244204ef4c6b3ce7 (patch)
treedda85cb44d58cf361b142c6f441fde01e7f6613b /drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
parent812902159d4174df9a82948c0445becb865dabec (diff)
downloadlinux-f6dbe38edf1ef4929847c90e244204ef4c6b3ce7.tar.xz
scsi: ibmvscsis: Fixed a bug reported by Dan Carpenter
SUPPORTED_FORMATS is 1 << 1 so it's never zero. Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com> Signed-off-by: Michael Cyr <mikecyr@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c')
-rw-r--r--drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index f3c997f0ecba..4dd8e5effddb 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -1978,7 +1978,7 @@ static long ibmvscsis_srp_login(struct scsi_info *vscsi,
reason = SRP_LOGIN_REJ_MULTI_CHANNEL_UNSUPPORTED;
else if (fmt->buffers & (~SUPPORTED_FORMATS))
reason = SRP_LOGIN_REJ_UNSUPPORTED_DESCRIPTOR_FMT;
- else if ((fmt->buffers | SUPPORTED_FORMATS) == 0)
+ else if ((fmt->buffers & SUPPORTED_FORMATS) == 0)
reason = SRP_LOGIN_REJ_UNSUPPORTED_DESCRIPTOR_FMT;
if (vscsi->state == SRP_PROCESSING)