diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-10-08 19:16:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-17 17:46:33 -0400 |
commit | ad18027f4909c8fc107056460c97dbedb6635128 (patch) | |
tree | cf15d6e79ba3324e4974634a7fa446ff10fa4381 | |
parent | c19ecd654209725444d1f47a4422e6f48846b53c (diff) |
USB: mos7840.c: fix a check-after-dereference
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>
-rw-r--r-- | drivers/usb/serial/mos7840.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 021be39fe16e..5b71962d0351 100644 --- 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, | |||
2413 | } | 2413 | } |
2414 | 2414 | ||
2415 | mos7840_port = mos7840_get_port_private(port); | 2415 | mos7840_port = mos7840_get_port_private(port); |
2416 | tty = mos7840_port->port->tty; | ||
2417 | 2416 | ||
2418 | if (mos7840_port == NULL) | 2417 | if (mos7840_port == NULL) |
2419 | return -1; | 2418 | return -1; |
2420 | 2419 | ||
2420 | tty = mos7840_port->port->tty; | ||
2421 | |||
2421 | dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); | 2422 | dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); |
2422 | 2423 | ||
2423 | switch (cmd) { | 2424 | switch (cmd) { |