fix a crash in mtd_concat when the .sync op is not implemented
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 1 Jun 2011 02:23:22 +0000 (02:23 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 1 Jun 2011 02:23:22 +0000 (02:23 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27074 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic/patches-2.6.37/475-mtd_concat_sync_fix.patch [new file with mode: 0644]
target/linux/generic/patches-2.6.38/474-mtd_concat_sync_fix.patch [new file with mode: 0644]
target/linux/generic/patches-2.6.39/474-mtd_concat_sync_fix.patch [new file with mode: 0644]

diff --git a/target/linux/generic/patches-2.6.37/475-mtd_concat_sync_fix.patch b/target/linux/generic/patches-2.6.37/475-mtd_concat_sync_fix.patch
new file mode 100644 (file)
index 0000000..4e3426b
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/mtd/mtdconcat.c
++++ b/drivers/mtd/mtdconcat.c
+@@ -619,7 +619,8 @@ static void concat_sync(struct mtd_info 
+       for (i = 0; i < concat->num_subdev; i++) {
+               struct mtd_info *subdev = concat->subdev[i];
+-              subdev->sync(subdev);
++              if (subdev->sync)
++                      subdev->sync(subdev);
+       }
+ }
diff --git a/target/linux/generic/patches-2.6.38/474-mtd_concat_sync_fix.patch b/target/linux/generic/patches-2.6.38/474-mtd_concat_sync_fix.patch
new file mode 100644 (file)
index 0000000..4e3426b
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/mtd/mtdconcat.c
++++ b/drivers/mtd/mtdconcat.c
+@@ -619,7 +619,8 @@ static void concat_sync(struct mtd_info 
+       for (i = 0; i < concat->num_subdev; i++) {
+               struct mtd_info *subdev = concat->subdev[i];
+-              subdev->sync(subdev);
++              if (subdev->sync)
++                      subdev->sync(subdev);
+       }
+ }
diff --git a/target/linux/generic/patches-2.6.39/474-mtd_concat_sync_fix.patch b/target/linux/generic/patches-2.6.39/474-mtd_concat_sync_fix.patch
new file mode 100644 (file)
index 0000000..4e3426b
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/mtd/mtdconcat.c
++++ b/drivers/mtd/mtdconcat.c
+@@ -619,7 +619,8 @@ static void concat_sync(struct mtd_info 
+       for (i = 0; i < concat->num_subdev; i++) {
+               struct mtd_info *subdev = concat->subdev[i];
+-              subdev->sync(subdev);
++              if (subdev->sync)
++                      subdev->sync(subdev);
+       }
+ }
This page took 0.023412 seconds and 4 git commands to generate.