USB: android: NULL check before accessing cdev
An incorrect write to Function FS EP0 file
with FFS_READ_STRINGS function state
will lead to a crash when adb is not enabled.
If ADB is not enabled, the android_dev will not
be set and hence the missing dev NULL check
would lead to a crash.
Add the dev NULL check to fix this issue.
CRs-Fixed: 560999
Change-Id: I0350f736c53dcef8def71eb37d85d06e9d4b3277
Signed-off-by:
Sujeet Kumar <ksujeet@codeaurora.org>
Loading
Please register or sign in to comment