Commit f7ba06c5 authored by Roel Kluin's avatar Roel Kluin Committed by james toy

struct pmcraid_ioctl_header member buffer_length is unsigned, so this

check appears redundant.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarAnil Ravindranath <anil_ravindranath@pmc-sierra.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 3126efe0
...@@ -3736,12 +3736,6 @@ static int pmcraid_check_ioctl_buffer( ...@@ -3736,12 +3736,6 @@ static int pmcraid_check_ioctl_buffer(
return -EINVAL; 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 */ /* check for appropriate buffer access */
if ((_IOC_DIR(cmd) & _IOC_READ) == _IOC_READ) if ((_IOC_DIR(cmd) & _IOC_READ) == _IOC_READ)
access = VERIFY_WRITE; access = VERIFY_WRITE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment