fix a crash in mtd_concat when the .sync op is not implemented
SVN-Revision: 27074
This commit is contained in:
parent
628cb35179
commit
56dd5c4388
3 changed files with 36 additions and 0 deletions
|
@ -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 a new issue