From: Alan Stern Date: Thu, 9 Jul 2009 16:59:57 +0000 (-0400) Subject: USB: cypress_m8: remove invalid Clear-Halt X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d2fae8b3597bc787f1f1c06637ce5ab8187e5a7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 9734085fd2fe..59adfe123110 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/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,