qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] register: Remove unnecessary NULL check
@ 2020-10-02 15:53 Alistair Francis
  2020-10-13 15:40 ` Alistair Francis
  2020-11-12 15:51 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Alistair Francis @ 2020-10-02 15:53 UTC (permalink / raw)
  To: qemu-devel, ehabkost; +Cc: peter.maydell, alistair.francis, f4bug, alistair23

This patch fixes CID 1432800 by removing an unnecessary check.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 hw/core/register.c | 4 ----
 1 file changed, 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);
 
-- 
2.28.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-13  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-02 15:53 [PATCH v2 1/1] register: Remove unnecessary NULL check Alistair Francis
2020-10-13 15:40 ` Alistair Francis
2020-11-12 15:51 ` Peter Maydell
2020-11-13  0:32   ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).