From: Bryant G. Ly Date: Wed, 31 Aug 2016 16:29:01 +0000 (-0500) Subject: scsi: ibmvscsis: Fixed a bug reported by Dan Carpenter X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=f6dbe38edf1ef4929847c90e244204ef4c6b3ce7;p=deliverable%2Flinux.git 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 Signed-off-by: Michael Cyr Signed-off-by: Martin K. Petersen --- 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)