提交 ad18027f 编写于 作者: A Adrian Bunk 提交者: Greg Kroah-Hartman

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

This patch fixes an obvious check-after-dereference spotted by the
Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册