projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b96bf4c
)
UBI: bugfix: dont oops with NULL module parameter
author
Artem Bityutskiy
<Artem.Bityutskiy@nokia.com>
Sun, 16 Dec 2007 14:46:57 +0000
(16:46 +0200)
committer
Artem Bityutskiy
<Artem.Bityutskiy@nokia.com>
Wed, 26 Dec 2007 17:15:15 +0000
(19:15 +0200)
E.g., it oopsed in case of: modprobe ubi mtd = 0
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/build.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/ubi/build.c
b/drivers/mtd/ubi/build.c
index 9b94427be1452d675183ba143e23486a116f9350..b85ca186afc6eb88fc598ded200c02a884e7861a 100644
(file)
--- a/
drivers/mtd/ubi/build.c
+++ b/
drivers/mtd/ubi/build.c
@@
-845,6
+845,9
@@
static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
char *pbuf = &buf[0];
char *tokens[3] = {NULL, NULL, NULL};
+ if (!val)
+ return -EINVAL;
+
if (mtd_devs == UBI_MAX_DEVICES) {
printk("UBI error: too many parameters, max. is %d\n",
UBI_MAX_DEVICES);