]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
scsi: myrs: Fix a logical vs bitwise bug
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 19 Oct 2018 09:16:28 +0000 (12:16 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Oct 2018 22:30:28 +0000 (18:30 -0400)
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>
drivers/scsi/myrs.c

index a9f9c77e889faaca728597bd516c4afc0f17982a..947d9b63d922c3db00e4c39f9cf2936dd80cbea2 100644 (file)
@@ -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);
 }