diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 668d24005106..65915a649861 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
@@ -480,6 +480,13 @@ static int nor_erase_prepare(struct ubi_device *ubi, int pnum) | |||
480 | size_t written; | 480 | size_t written; |
481 | loff_t addr; | 481 | loff_t addr; |
482 | uint32_t data = 0; | 482 | uint32_t data = 0; |
483 | /* | ||
484 | * Note, we cannot generally define VID header buffers on stack, | ||
485 | * because of the way we deal with these buffers (see the header | ||
486 | * comment in this file). But we know this is a NOR-specific piece of | ||
487 | * code, so we can do this. But yes, this is error-prone and we should | ||
488 | * (pre-)allocate VID header buffer instead. | ||
489 | */ | ||
483 | struct ubi_vid_hdr vid_hdr; | 490 | struct ubi_vid_hdr vid_hdr; |
484 | 491 | ||
485 | /* | 492 | /* |