USB: f_accessory: Check dev pointer before decoding ctrl request
In case of poweroff charging mode, accessory function instance
is not created and due to this, _acc_dev will be NULL. If target
is connected to Accessory dock in poweroff charging mode, there
is a chance dev pointer is accessed, which is NULL. Hence add a
check before processing control request and return error if it is
NULL.
Change-Id: I4f1deb9d764b8c0bd1d7837cbc43a2933167f568
Signed-off-by:
Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Loading
Please register or sign in to comment