From: Dan Carpenter <dan.carpenter@oracle.com>
To: lanqing.liu@unisoc.com
Cc: linux-serial@vger.kernel.org
Subject: [bug report] serial: sprd: Add DMA mode support
Date: Thu, 12 Mar 2020 11:01:17 +0300 [thread overview]
Message-ID: <20200312080117.GA3881@mwanda> (raw)
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
next reply other threads:[~2020-03-12 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 8:01 Dan Carpenter [this message]
2020-03-12 8:52 ` 答复: [bug report] serial: sprd: Add DMA mode support 刘岚清 (Lanqing Liu)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200312080117.GA3881@mwanda \
--to=dan.carpenter@oracle.com \
--cc=lanqing.liu@unisoc.com \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).