From: Roel Kluin Date: Thu, 11 Mar 2010 22:09:44 +0000 (-0800) Subject: [SCSI] pmcraid: redundant check in pmcraid_check_ioctl_buffer() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3d6e1dcd291fd0da3accb0d60fbd0d26d2189ed;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SCSI] pmcraid: redundant check in pmcraid_check_ioctl_buffer() struct pmcraid_ioctl_header member buffer_length is unsigned, so this check appears redundant. Signed-off-by: Roel Kluin Acked-by: Anil Ravindranath Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 53aefffbaead..c44e4ab4e938 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -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;