Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bc9e704 authored by Manu Gautam's avatar Manu Gautam
Browse files

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: default avatarManu Gautam <mgautam@codeaurora.org>
parent dc9078ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment