aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2020-11-17 12:56:32 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-11-17 12:56:32 +0000
commitea2d7fcf3556bc279922fac08ea990093f1d7923 (patch)
tree97910228fda116e1771c1301cdaed2448b1e65a2
parent7b0263cb14c809d1553b7349d5729750651af7d8 (diff)
register: Remove unnecessary NULL check
This patch fixes CID 1432800 by removing an unnecessary check. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/core/register.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/hw/core/register.c b/hw/core/register.c
index 31038bd7cc..3600ef5bde 100644
--- a/hw/core/register.c
+++ b/hw/core/register.c
@@ -258,10 +258,6 @@ static RegisterInfoArray *register_init_block(DeviceState *owner,
int index = rae[i].addr / data_size;
RegisterInfo *r = &ri[index];
- if (data + data_size * index == 0 || !&rae[i]) {
- continue;
- }
-
/* Init the register, this will zero it. */
object_initialize((void *)r, sizeof(*r), TYPE_REGISTER);