qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 5/8] hw/i2c: Tidy up NULL check for i2c slave


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v4 5/8] hw/i2c: Tidy up NULL check for i2c slave init callbacks
Date: Fri, 16 Dec 2016 12:56:38 +0000

On 15 December 2016 at 05:48, Alastair D'Silva <address@hidden> wrote:
> From: Alastair D'Silva <address@hidden>
>
> Remove unnecessary syntax
>
> Signed-off-by: Alastair D'Silva <address@hidden>
> ---
>  hw/i2c/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/i2c/core.c b/hw/i2c/core.c
> index ae3ca94..e40781e 100644
> --- a/hw/i2c/core.c
> +++ b/hw/i2c/core.c
> @@ -262,9 +262,9 @@ static int i2c_slave_qdev_init(DeviceState *dev)
>
>      if (sc->init) {
>          return sc->init(s);
> -    } else {
> -        return 0;
>      }
> +
> +    return 0;
>  }
>
>  DeviceState *i2c_create_slave(I2CBus *bus, const char *name, uint8_t addr)

I'll just squash this change into the 'hw/i2c: Add a NULL check for i2c
slave init callbacks' patch since that's still only in target-arm.next.

thanks
-- PMM



reply via email to

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