From: Alistair Francis Date: Tue, 17 Nov 2020 12:56:32 +0000 (+0000) Subject: register: Remove unnecessary NULL check X-Git-Tag: v5.2.0-rc2~3^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea2d7fcf3556bc279922fac08ea990093f1d7923;p=thirdparty%2Fqemu.git register: Remove unnecessary NULL check This patch fixes CID 1432800 by removing an unnecessary check. Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- diff --git a/hw/core/register.c b/hw/core/register.c index 31038bd7ccf..3600ef5bde7 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);