[SCSI] sr: fix error code check in sr_block_ioctl()
authorTejun Heo <htejun@gmail.com>
Tue, 2 Jan 2007 08:41:04 +0000 (17:41 +0900)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 6 Jan 2007 15:05:50 +0000 (09:05 -0600)
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.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sr.c

index fae6e95a629884cdcffdb50058b522419115e722..89e9b36b17882daecaa73660647abd87ba8d9553 100644 (file)
@@ -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;
 
        /*