Skip to content

Commit

Permalink
USB: cypress_m8: remove invalid Clear-Halt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
AlanStern authored and gregkh committed Jul 12, 2009
1 parent 1fe975f commit 4d2fae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/serial/cypress_m8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4d2fae8

Please sign in to comment.