aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch')
-rw-r--r--target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch b/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch
index c653c6a3f3..bae70d41b6 100644
--- a/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch
+++ b/target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch
@@ -32,7 +32,7 @@ diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/
+ if (!mtdname)
+ mtdname = devname;
+
-+ dev->mtd.name = kmalloc(strlen(mtdname), GFP_KERNEL);
++ dev->mtd.name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL);
+
if (!dev->mtd.name)
goto devinit_err;