USB: correct locking in gadgetfs_disconnect
This patch moves spin_lock (&dev->lock) before first use of dev. I think that test to the state of device should be protected with this spin_lock... Signed-off-by: NMilan Svoboda <msvoboda@ra.rockwell.com> Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Showing
想要评论请 注册 或 登录