Skip to content
Commit f0cae93f authored by Marcus Nutzinger's avatar Marcus Nutzinger Committed by Felipe Balbi
Browse files

usb: gadget: gadgetfs: correct dev state

This reverts commit 1826e9b1

 (usb: gadget: gadgetfs: use
after free in dev_release()) and places the call to
put_dev() after setting the state.

If this is not the final call to dev_release() and the
state is not reset to STATE_DEV_DISABLED and hence all
further open() calls to the gadgetfs ep0 device will
fail with EBUSY.

Signed-off-by: default avatarMarcus Nutzinger <marcus.nutzinger@theobroma-systems.com>
Reviewed-by: default avatarChristoph Muellner <christoph.muellner@theobroma-systems.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 14574b54
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment