aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 54bb37d41916..45975b4984ea 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1157,15 +1157,19 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message)
1157 1157
1158 serial->suspending = 1; 1158 serial->suspending = 1;
1159 1159
1160 if (serial->type->suspend) {
1161 r = serial->type->suspend(serial, message);
1162 if (r < 0)
1163 goto err_out;
1164 }
1165
1160 for (i = 0; i < serial->num_ports; ++i) { 1166 for (i = 0; i < serial->num_ports; ++i) {
1161 port = serial->port[i]; 1167 port = serial->port[i];
1162 if (port) 1168 if (port)
1163 kill_traffic(port); 1169 kill_traffic(port);
1164 } 1170 }
1165 1171
1166 if (serial->type->suspend) 1172err_out:
1167 r = serial->type->suspend(serial, message);
1168
1169 return r; 1173 return r;
1170} 1174}
1171EXPORT_SYMBOL(usb_serial_suspend); 1175EXPORT_SYMBOL(usb_serial_suspend);