diff options
-rw-r--r-- | drivers/spmi/spmi-sandbox.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spmi/spmi-sandbox.c b/drivers/spmi/spmi-sandbox.c index 2f0fea0..980aff2 100644 --- a/drivers/spmi/spmi-sandbox.c +++ b/drivers/spmi/spmi-sandbox.c @@ -35,7 +35,8 @@ struct sandbox_emul_fake_regs { }; struct sandbox_emul_gpio { - struct sandbox_emul_fake_regs r[EMUL_GPIO_REG_END]; /* Fake registers */ + /* Fake registers - need one more entry as REG_END is valid address. */ + struct sandbox_emul_fake_regs r[EMUL_GPIO_REG_END + 1]; }; struct sandbox_spmi_priv { |