mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
c19ecd6542
commit
ad18027f49
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue