Commit ad18027f authored by Adrian Bunk's avatar Adrian Bunk Committed by Greg Kroah-Hartman
Browse files

USB: mos7840.c: fix a check-after-dereference

This patch fixes an obvious check-after-dereference spotted by the
Coverity checker.

Signed-off-by: default avatarAdrian Bunk <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent c19ecd65
......@@ -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) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment