summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/patches-2.6.22
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-08-19 01:06:26 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-08-19 01:06:26 +0000
commitce9fff401a018793bd60ba52fd67fb8d09c34568 (patch)
tree2c0408532c9e5fb02327f31b8517954afb8e9162 /target/linux/generic-2.6/patches-2.6.22
parent60157ca058433c3a7f088b05e7fe9def0a944bac (diff)
downloadmtk-20170518-ce9fff401a018793bd60ba52fd67fb8d09c34568.zip
mtk-20170518-ce9fff401a018793bd60ba52fd67fb8d09c34568.tar.gz
mtk-20170518-ce9fff401a018793bd60ba52fd67fb8d09c34568.tar.bz2
fix an off-by-one error
SVN-Revision: 8427
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.22')
-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 c653c6a..bae70d4 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;