[SCSI] pmcraid: redundant check in pmcraid_check_ioctl_buffer()
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 11 Mar 2010 22:09:44 +0000 (14:09 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 11 Apr 2010 14:23:32 +0000 (09:23 -0500)
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>
drivers/scsi/pmcraid.c

index 53aefffbaead2027c09d2da7925fe3c0afecb607..c44e4ab4e938db7a3d370d9406a801f324bc7132 100644 (file)
@@ -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;