diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-06-16 15:29:36 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-06-16 15:29:36 -0700 |
commit | b0477f5f8ec85bf8a82f6aa6eee308d72c418032 (patch) | |
tree | d520be10a261f418dbf4539f1d2b5d48d74ba0d3 /drivers/mtd/ubi/cdev.c | |
parent | 13a29d9ad242f0bf3b31afe812c81558d54892de (diff) | |
parent | 9a004a75a3305fbd3c253f38cd0788164c4fbd56 (diff) |
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-androidlsk-v3.18-15.07-android
Diffstat (limited to 'drivers/mtd/ubi/cdev.c')
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 59de69a24e40..3946d78e6a81 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c @@ -453,7 +453,7 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, /* Validate the request */ err = -EINVAL; if (req.lnum < 0 || req.lnum >= vol->reserved_pebs || - req.bytes < 0 || req.lnum >= vol->usable_leb_size) + req.bytes < 0 || req.bytes > vol->usable_leb_size) break; err = get_exclusive(desc); |