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

Skip to content
Commit 7a822e24 authored by Saket Saurabh's avatar Saket Saurabh
Browse files

usb/gadget: android: Handle NULL pointer dereference in android_probe()



In android probe(), 'usb_core_id' filed  is passed as part of platform
data and is used as id for the usb android device. If platform data is
itself NULL, then accessing pdata.usb_core_id would lead to NULL
pointer deference.
This change adds NULL check for pdata in android_probe() before
using pdata.usb_core_id with android_create_device(). If pdata is
itself NULL, then use value 0 with android_create_device(), since the
primary usb core should always have usb_core_id as 0.

CRs-Fixed: 561002
Change-Id: I7ce131a9f8d57e519f8a9e1f44c770725358cff0
Signed-off-by: default avatarSaket Saurabh <ssaurabh@codeaurora.org>
parent 14a5d3a3
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