qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/1] register: Remove unnecessary NULL check


From: Alistair Francis
Subject: Re: [PATCH v2 1/1] register: Remove unnecessary NULL check
Date: Thu, 12 Nov 2020 16:32:42 -0800

On Thu, Nov 12, 2020 at 7:51 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Fri, 2 Oct 2020 at 17:04, Alistair Francis <alistair.francis@wdc.com> 
> wrote:
> >
> > 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
>
> Applied to target-arm.next, thanks.

Thanks Peter

Alistair

>
> -- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]