aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/pl2303.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r--drivers/usb/serial/pl2303.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 3368d2b0412d..a52115407ea1 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -677,6 +677,9 @@ static int pl2303_tiocmset (struct usb_serial_port *port, struct file *file,
677 unsigned long flags; 677 unsigned long flags;
678 u8 control; 678 u8 control;
679 679
680 if (!usb_get_intfdata(port->serial->interface))
681 return -ENODEV;
682
680 spin_lock_irqsave (&priv->lock, flags); 683 spin_lock_irqsave (&priv->lock, flags);
681 if (set & TIOCM_RTS) 684 if (set & TIOCM_RTS)
682 priv->line_control |= CONTROL_RTS; 685 priv->line_control |= CONTROL_RTS;
@@ -702,6 +705,9 @@ static int pl2303_tiocmget (struct usb_serial_port *port, struct file *file)
702 705
703 dbg("%s (%d)", __FUNCTION__, port->number); 706 dbg("%s (%d)", __FUNCTION__, port->number);
704 707
708 if (!usb_get_intfdata(port->serial->interface))
709 return -ENODEV;
710
705 spin_lock_irqsave (&priv->lock, flags); 711 spin_lock_irqsave (&priv->lock, flags);
706 mcr = priv->line_control; 712 mcr = priv->line_control;
707 status = priv->line_status; 713 status = priv->line_status;