Skip to content

Commit

Permalink
[SCSI] pmcraid: redundant check in pmcraid_check_ioctl_buffer()
Browse files Browse the repository at this point in the history
struct pmcraid_ioctl_header member buffer_length is unsigned, so this
check appears redundant.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Anil Ravindranath <anil_ravindranath@pmc-sierra.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Roel Kluin authored and James Bottomley committed Apr 11, 2010
1 parent 6ce00ca commit f3d6e1d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/scsi/pmcraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -3751,12 +3751,6 @@ static int pmcraid_check_ioctl_buffer(
return -EINVAL;
}

/* buffer length can't be negetive */
if (hdr->buffer_length < 0) {
pmcraid_err("ioctl: invalid buffer length specified\n");
return -EINVAL;
}

/* check for appropriate buffer access */
if ((_IOC_DIR(cmd) & _IOC_READ) == _IOC_READ)
access = VERIFY_WRITE;
Expand Down

0 comments on commit f3d6e1d

Please sign in to comment.