[bug report] serial: sprd: Add DMA mode support

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

 



Hello Lanqing Liu,

The patch f4487db58eb7: "serial: sprd: Add DMA mode support" from Mar
4, 2019, leads to the following static checker warning:

	drivers/tty/serial/sprd_serial.c:1141 sprd_remove()
	error: we previously assumed 'sup' could be null (see line 1132)

drivers/tty/serial/sprd_serial.c
  1128  static int sprd_remove(struct platform_device *dev)
  1129  {
  1130          struct sprd_uart_port *sup = platform_get_drvdata(dev);
  1131  
  1132          if (sup) {
                    ^^^
Check

  1133                  uart_remove_one_port(&sprd_uart_driver, &sup->port);
  1134                  sprd_port[sup->port.line] = NULL;
  1135                  sprd_ports_num--;
  1136          }
  1137  
  1138          if (!sprd_ports_num)
  1139                  uart_unregister_driver(&sprd_uart_driver);
  1140  
  1141          sprd_rx_free_buf(sup);
                                 ^^^
Unchecked dereference inside function

  1142  
  1143          return 0;
  1144  }

regards,
dan carpenter



[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