From: Adrian Bunk <bunk@stusta.de>
To: gregkh@suse.de
Cc: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: drivers/usb/serial/mos7720.c: inconsequent NULL checking
Date: Sat, 11 Nov 2006 17:22:08 +0100 [thread overview]
Message-ID: <20061111162208.GC8809@stusta.de> (raw)
The Coverity checker noted the following inconsequent NULL checking in
drivers/usb/serial/mos7720.c:
<-- snip -->
...
static void mos7720_close(struct usb_serial_port *port, struct file *filp)
{
...
/* While closing port, shutdown all bulk read, write *
* and interrupt read if they exists */
if (serial->dev) {
dbg("Shutdown bulk write");
usb_kill_urb(port->write_urb);
dbg("Shutdown bulk read");
usb_kill_urb(port->read_urb);
}
data = 0x00;
send_mos_cmd(serial, MOS_WRITE, port->number - port->serial->minor,
0x04, &data);
...
<-- snip -->
Note that "send_mos_cmd(serial,...)" dereferences "serial->dev".
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next reply other threads:[~2006-11-11 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-11 16:22 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-02-06 22:13 drivers/usb/serial/mos7720.c: inconsequent NULL checking Adrian Bunk
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=20061111162208.GC8809@stusta.de \
--to=bunk@stusta.de \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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