Skip to content

Commit

Permalink
scsi: myrs: Fix a logical vs bitwise bug
Browse files Browse the repository at this point in the history
The || was supposed to be |.  The original code just sets ->result to 1.

Fixes: 7726618 ("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>
  • Loading branch information
Dan Carpenter authored and Martin K. Petersen committed Oct 19, 2018
1 parent f4445bb commit 9a231ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/myrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9a231ca

Please sign in to comment.