Skip to content

Commit

Permalink
RFC: raw_gadget: don't disable device if usb_ep_queue fails
Browse files Browse the repository at this point in the history
To avoid disabling the Raw Gadget device if the emulation code
accidentally does an endpoint operation on a disabled endpoint.
  • Loading branch information
xairy committed Sep 20, 2023
1 parent ff587c7 commit 60042be
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions raw_gadget/raw_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,6 @@ static int raw_process_ep0_io(struct raw_dev *dev, struct usb_raw_ep_io *io,
dev_err(&dev->gadget->dev,
"fail, usb_ep_queue returned %d\n", ret);
spin_lock_irqsave(&dev->lock, flags);
dev->state = STATE_DEV_FAILED;
goto out_queue_failed;
}

Expand Down Expand Up @@ -1145,7 +1144,6 @@ static int raw_process_ep_io(struct raw_dev *dev, struct usb_raw_ep_io *io,
dev_err(&dev->gadget->dev,
"fail, usb_ep_queue returned %d\n", ret);
spin_lock_irqsave(&dev->lock, flags);
dev->state = STATE_DEV_FAILED;
goto out_queue_failed;
}

Expand Down

0 comments on commit 60042be

Please sign in to comment.