Skip to contentSkip to conversation

rts_pstor: Fix invalid check

PATCH New Alan Cox 1 participant 1 message Sep 4, 2012 Staging

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 rts_pstor: Fix invalid check

From: Alan Cox <[email protected]>

As noted by David Binderman

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=46581

---

 drivers/staging/rts_pstor/rtsx_scsi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rts_pstor/rtsx_scsi.c +1 -1
index f2e5842..936b82d 100644
@@ -2482,7 +2482,7 @@ static int spi_vendor_cmd(struct scsi_cmnd *srb, struct rtsx_chip *chip)
 	unsigned int lun = SCSI_LUN(srb);
 	u8 gpio_dir;
 
-	if (CHECK_PID(chip, 0x5208) && CHECK_PID(chip, 0x5288)) {
+	if (CHECK_PID(chip, 0x5208) || CHECK_PID(chip, 0x5288)) {
 		set_sense_type(chip, lun, SENSE_TYPE_MEDIA_INVALID_CMD_FIELD);
 		TRACE_RET(chip, TRANSPORT_FAILED);
 	}