[smatch stuff] altera_uart: inconsistent checks for null

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

 



Hi Tobias,

Patch 2780ad42f5fe67 "tty: serial: altera_uart: Use port->regshift to
store bus shift" added a NULL check for platp in altera_uart_probe() but
not consistently through out the function.

drivers/tty/serial/altera_uart.c +553 altera_uart_probe(43)
	error: we previously assumed 'platp' could be null.

   545          if (platp)
                   ^^^^^^^
checked here.

   546                  port->regshift = platp->bus_shift;
   547          else
   548                  port->regshift = 0;
   549
   550          port->line = i;
   551          port->type = PORT_ALTERA_UART;
   552          port->iotype = SERIAL_IO_MEM;
   553          port->uartclk = platp->uartclk;
                                ^^^^^^^
potential NULL dereference?

   554          port->ops = &altera_uart_ops;

I don't know the right way to address this.

regards,
dan carpenter
--
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