linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] serial: sprd: Add DMA mode support
@ 2020-03-12  8:01 Dan Carpenter
  2020-03-12  8:52 ` 答复: " 刘岚清 (Lanqing Liu)
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-03-12  8:01 UTC (permalink / raw)
  To: lanqing.liu; +Cc: linux-serial

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-12  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-12  8:01 [bug report] serial: sprd: Add DMA mode support Dan Carpenter
2020-03-12  8:52 ` 答复: " 刘岚清 (Lanqing Liu)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).