usb: gadget: Do not disconnect unregistered dev
configfs_composite_unbind sets the gadget data to null. Therefore, add check in android_disconnect function to make sure that cdev is not NULL. This prevents NULL pointer dereference upon accessing cdev. CRs-Fixed: 10841367 Change-Id: Ib59cdd88557d917c85d8d33968efc295bcef2280 Signed-off-by:Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment