aboutsummaryrefslogtreecommitdiff
path: root/hw/onenand.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/onenand.c')
-rw-r--r--hw/onenand.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/onenand.c b/hw/onenand.c
index e8d1d4b1a5..b0cbebc178 100644
--- a/hw/onenand.c
+++ b/hw/onenand.c
@@ -720,6 +720,7 @@ void *onenand_init(BlockDriverState *bdrv,
if (!s->bdrv) {
s->image = memset(qemu_malloc(size + (size >> 5)),
0xff, size + (size >> 5));
+ }
s->otp = memset(qemu_malloc((64 + 2) << PAGE_SHIFT),
0xff, (64 + 2) << PAGE_SHIFT);
s->ram = qemu_ram_alloc(NULL, "onenand.ram", 0xc000 << s->shift);