mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:30:16 +02:00
fix a crash in mtd_concat when the .sync op is not implemented
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27074 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
66a8e8ec8d
commit
dcab6b06b2
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user