lkml.org 
[lkml]   [2010]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH 2/2] serial: Add driver for the Altera UART
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.

regards,
dan carpenter


\
 
 \ /
  Last update: 2010-02-26 21:01    [W:0.313 / U:1.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site