]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
USB: oti6858: fix abuse of interface data
authorJohan Hovold <jhovold@gmail.com>
Wed, 25 Apr 2012 13:56:30 +0000 (15:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2012 18:37:18 +0000 (11:37 -0700)
Fix abuse of interface data which was used to signal device disconnect.

Note that neither tiocmset or tiocmget need to check for disconnect as
they do not access the device.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/oti6858.c

index 5fdc33c6a3c003f7ab0cad429aca4c8dd5327b48..8bc8ea45825b15e788230d609705fd70d3cc42fb 100644 (file)
@@ -633,9 +633,6 @@ static int oti6858_tiocmset(struct tty_struct *tty,
        dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)",
                                __func__, port->number, set, clear);
 
-       if (!usb_get_intfdata(port->serial->interface))
-               return -ENODEV;
-
        /* FIXME: check if this is correct (active high/low) */
        spin_lock_irqsave(&priv->lock, flags);
        control = priv->pending_setup.control;
@@ -665,9 +662,6 @@ static int oti6858_tiocmget(struct tty_struct *tty)
 
        dbg("%s(port = %d)", __func__, port->number);
 
-       if (!usb_get_intfdata(port->serial->interface))
-               return -ENODEV;
-
        spin_lock_irqsave(&priv->lock, flags);
        pin_state = priv->status.pin_state & PIN_MASK;
        spin_unlock_irqrestore(&priv->lock, flags);