USB: f_accessory: Fix crash if driver failed to initialize
If accessory driver setup fails then _acc_dev points to
freed memory and later drivers crashes on disconnect
due to invalid memory access. Mark _acc_dev only if
acc_setup is successful to prevent the crash.
Change-Id: Ica933a7cf710ff082c54db77f94f802b6832bedb
Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment