ath9k: fix a crash in led init
[openwrt.git] / package / mtd / src / mtd.c
index 7f58165..5fa260b 100644 (file)
@@ -41,7 +41,7 @@
 #include <sys/stat.h>
 #include <sys/reboot.h>
 #include <linux/reboot.h>
 #include <sys/stat.h>
 #include <sys/reboot.h>
 #include <linux/reboot.h>
-#include "mtd-api.h"
+#include <mtd/mtd-user.h>
 #include "fis.h"
 #include "mtd.h"
 
 #include "fis.h"
 #include "mtd.h"
 
@@ -409,6 +409,9 @@ resume:
                                /* got an EOF marker - this is the place to add some jffs2 data */
                                skip = mtd_replace_jffs2(mtd, fd, e, jffs2file);
 
                                /* got an EOF marker - this is the place to add some jffs2 data */
                                skip = mtd_replace_jffs2(mtd, fd, e, jffs2file);
 
+                               /* don't add it again */
+                               jffs2file = NULL;
+
                                w += skip;
                                e += skip;
                                skip -= buflen;
                                w += skip;
                                e += skip;
                                skip -= buflen;
This page took 0.029915 seconds and 4 git commands to generate.