Re: [RESEND PATCH 2/2] serial: Add driver for the Altera UART

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

 



On 2010-02-26 at 20:50:22 +0100, Dan Carpenter <error27@xxxxxxxxx> wrote:
> A couple smatch complaints.
> 
> drivers/serial/altera_jtaguart.c
>    380          if (co->index >= 0 && co->index <= ALTERA_JTAGUART_MAXPORTS)
>    381                  co->index = 0;
>    382          port = &altera_jtaguart_ports[co->index].port;
> 
> This test seems backward.  co->index == -1 would be a buffer underflow.
> 
> drivers/serial/altera_uart.c
>    455          if ((co->index >= 0)
>    456              && (co->index <= CONFIG_SERIAL_ALTERA_UART_MAXPORTS))
>    457                  co->index = 0;
>    458          port = &altera_uart_ports[co->index].port;
> 
> Same here.

Yep, those look completely wrong. I'll post an updated patch (including
the other changes suggested by Alan and Peter) later on.

Thanks,
Tobias
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux