Merge branch 'master' into for-next
[pandora-kernel.git] / drivers / scsi / pmcraid.c
index ee161c6..b86db84 100644 (file)
@@ -3870,6 +3870,9 @@ static long pmcraid_ioctl_passthrough(
                        pmcraid_err("couldn't build passthrough ioadls\n");
                        goto out_free_buffer;
                }
+       } else if (request_size < 0) {
+               rc = -EINVAL;
+               goto out_free_buffer;
        }
 
        /* If data is being written into the device, copy the data from user