projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c19ecd6
)
USB: mos7840.c: fix a check-after-dereference
author
Adrian Bunk
<bunk@stusta.de>
Sun, 8 Oct 2006 23:16:32 +0000
(
01:16
+0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 17 Oct 2006 21:46:33 +0000
(14:46 -0700)
This patch fixes an obvious check-after-dereference spotted by the
Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/mos7840.c
patch
|
blob
|
history
diff --git
a/drivers/usb/serial/mos7840.c
b/drivers/usb/serial/mos7840.c
index
021be39
..
5b71962
100644
(file)
--- a/
drivers/usb/serial/mos7840.c
+++ b/
drivers/usb/serial/mos7840.c
@@
-2413,11
+2413,12
@@
static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
}
mos7840_port = mos7840_get_port_private(port);
- tty = mos7840_port->port->tty;
if (mos7840_port == NULL)
return -1;
+ tty = mos7840_port->port->tty;
+
dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd);
switch (cmd) {