This patch fixes an obvious check-after-dereference spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> --- linux-2.6/drivers/usb/serial/mos7840.c.old 2006-10-09 00:35:49.000000000 +0200 +++ linux-2.6/drivers/usb/serial/mos7840.c 2006-10-09 00:36:28.000000000 +0200 @@ -2412,11 +2412,12 @@ } 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) { ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel