Skip to contentSkip to conversation

SCSI: fix error code check in sr_block_ioctl()

PATCH New Tejun Heo 1 participant 1 message Jan 2, 2007 SCSI

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 SCSI: fix error code check in sr_block_ioctl()

sr_block_ioctl() should proceed to SCSI ioctls if cdrom_ioctl() returns -ENOSYS. However it tested for ENOSYS instead of -ENOSYS rendering all SCSI ioctls other than GET_IDLUN and GET_BUS_NUMBER inaccessible. Fix it.

drivers/scsi/sr.c +1 -1
index fae6e95..89e9b36 100644
@@ -468,7 +468,7 @@ static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd,
 	}
 
 	ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg);
-	if (ret != ENOSYS)
+	if (ret != -ENOSYS)
 		return ret;
 
 	/*