USB: f_accessory: Fix NULL pointer dereference in acc_read()
If user tries to read /dev/usb_accessory node, it results in calling
acc_read() callback. If accessory interface is not present in current
USB composition, it will lead to crash as dev->ep_out is NULL. Fix
the issue by moving problematic code down after device becomes online.
Change-Id: I6441f6dc3cbe3a84a384fa3e8a6583f65a74659d
Signed-off-by:
Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Loading
Please register or sign in to comment