Skip to content

Commit

Permalink
[SCSI] sr: fix error code check in sr_block_ioctl()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and James Bottomley committed Jan 6, 2007
1 parent a96e0c7 commit 6397256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 6397256

Please sign in to comment.