Amit Shah <amit.s...@redhat.com> wrote:
> In the flush_queued_data() function, we expect port to be valid. Assert
> only for port and not port || discard.
>
> Reported-by: Juan Quintela <quint...@redhat.com>
> Signed-off-by: Amit Shah <amit.s...@redhat.com>

reviewed-by: Juan Quintela <quint...@redhat.com>

> ---
>  hw/virtio-serial-bus.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index 97694d5..3ce95e8 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, 
> VirtQueue *vq,
>  
>  static void flush_queued_data(VirtIOSerialPort *port, bool discard)
>  {
> -    assert(port || discard);
> +    assert(port);
>  
>      do_flush_queued_data(port, port->ovq, &port->vser->vdev, discard);
>  }


Reply via email to