diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-06 02:00:48 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-06 02:00:48 -0500 |
commit | 02cee68998010c4a2cc2383c86babc2ecc737183 (patch) | |
tree | 13c6483472f672c3b2570b075ed2ad4fd4c5405e /drivers/mtd/ubi/build.c | |
parent | f5ba35023697e54a24487bcd822194390a333893 (diff) | |
parent | b419148e567728f6af0c3b01965c1cc141e3e13a (diff) |
Merge commit 'v2.6.32-rc6' into next
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-rw-r--r-- | drivers/mtd/ubi/build.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index e1f7d0a78b9d..14cec04c34f9 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/log2.h> | 42 | #include <linux/log2.h> |
43 | #include <linux/kthread.h> | 43 | #include <linux/kthread.h> |
44 | #include <linux/reboot.h> | 44 | #include <linux/reboot.h> |
45 | #include <linux/kernel.h> | ||
45 | #include "ubi.h" | 46 | #include "ubi.h" |
46 | 47 | ||
47 | /* Maximum length of the 'mtd=' parameter */ | 48 | /* Maximum length of the 'mtd=' parameter */ |
@@ -1257,7 +1258,7 @@ static int __init bytes_str_to_int(const char *str) | |||
1257 | unsigned long result; | 1258 | unsigned long result; |
1258 | 1259 | ||
1259 | result = simple_strtoul(str, &endp, 0); | 1260 | result = simple_strtoul(str, &endp, 0); |
1260 | if (str == endp || result < 0) { | 1261 | if (str == endp || result >= INT_MAX) { |
1261 | printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", | 1262 | printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", |
1262 | str); | 1263 | str); |
1263 | return -EINVAL; | 1264 | return -EINVAL; |