diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-10-19 11:16:28 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-20 00:30:28 +0200 |
commit | 9a231caa77c3afdf775bcc9b7c403244deb3d539 (patch) | |
tree | 94f46ae1010c9ebdac51d51d1bf12588a5a2d274 /drivers/scsi/myrs.c | |
parent | scsi: hisi_sas: Fix NULL pointer dereference (diff) | |
download | linux-9a231caa77c3afdf775bcc9b7c403244deb3d539.tar.xz linux-9a231caa77c3afdf775bcc9b7c403244deb3d539.zip |
scsi: myrs: Fix a logical vs bitwise bug
The || was supposed to be |. The original code just sets ->result to 1.
Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/myrs.c')
-rw-r--r-- | drivers/scsi/myrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index a9f9c77e889f..947d9b63d922 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -2086,7 +2086,7 @@ static void myrs_handle_scsi(struct myrs_hba *cs, struct myrs_cmdblk *cmd_blk, status == MYRS_STATUS_DEVICE_NON_RESPONSIVE2) scmd->result = (DID_BAD_TARGET << 16); else - scmd->result = (DID_OK << 16) || status; + scmd->result = (DID_OK << 16) | status; scmd->scsi_done(scmd); } |