From: Oliver Neukum Date: Thu, 1 Oct 2009 13:01:17 +0000 (+0200) Subject: USB: small fix in error case of suspend in generic usbserial code X-Git-Tag: v3.0~7202^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5f6005d7b1821d2085d9749b56500a8f2610924;p=platform%2Fkernel%2Flinux-amlogic.git USB: small fix in error case of suspend in generic usbserial code usb:usbserial: fix flags in error case of suspension suspended flag must be reset in error case Signed-off-by: Oliver Neukum Cc: stable Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 2d0f75d..bd3fa7f 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -1168,8 +1168,10 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message) if (serial->type->suspend) { r = serial->type->suspend(serial, message); - if (r < 0) + if (r < 0) { + serial->suspending = 0; goto err_out; + } } for (i = 0; i < serial->num_ports; ++i) {