Ver Fonte

USB: cypress_m8: remove invalid Clear-Halt

This patch (as1265) removes an erroneous call to usb_clear_halt from
the cypress_m8 driver.  The call isn't valid because it is made from
interrupt context whereas usb_clear_halt is a blocking routine.

Presumably the code has never been executed; if it did it would cause
an oops.  So instead treat -EPIPE like any other sort of unexplained
error.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern há 16 anos atrás
pai
commit
4d2fae8b35
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      drivers/usb/serial/cypress_m8.c

+ 2 - 2
drivers/usb/serial/cypress_m8.c

@@ -1228,8 +1228,8 @@ static void cypress_read_int_callback(struct urb *urb)
 		/* precursor to disconnect so just go away */
 		return;
 	case -EPIPE:
-		usb_clear_halt(port->serial->dev, 0x81);
-		break;
+		/* Can't call usb_clear_halt while in_interrupt */
+		/* FALLS THROUGH */
 	default:
 		/* something ugly is going on... */
 		dev_err(&urb->dev->dev,