[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PULL trivial/urgent 2/2] fixed a copy&p
From: |
Andreas Färber |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PULL trivial/urgent 2/2] fixed a copy&paste error in serial.c |
Date: |
Mon, 17 Jun 2013 10:00:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
Am 17.06.2013 09:44, schrieb Michael Tokarev:
> From: Vladimir Senkov <address@hidden>
>
> Copy&paste error in serial.c causes a crash when attempting
> to read from UART (if there is no data to be read)
>
> Signed-off-by: Vladimir Senkov <address@hidden>
> Reviewed-by: Peter Crosthwaite <address@hidden>
> Signed-off-by: Michael Tokarev <address@hidden>
Any chance to get the subject improved before the pull is accepted?
E.g., "serial: Fix a copy&paste error" or "char/serial: ..."
Andreas
> ---
> hw/char/serial.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index b537e42..6382f98 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -424,7 +424,7 @@ static uint64_t serial_ioport_read(void *opaque, hwaddr
> addr, unsigned size)
> ret = s->divider & 0xff;
> } else {
> if(s->fcr & UART_FCR_FE) {
> - ret = fifo8_is_full(&s->recv_fifo) ?
> + ret = fifo8_is_empty(&s->recv_fifo) ?
> 0 : fifo8_pop(&s->recv_fifo);
> if (s->recv_fifo.num == 0) {
> s->lsr &= ~(UART_LSR_DR | UART_LSR_BI);
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg