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

Skip to content
Commit 08901c67 authored by Hemant Kumar's avatar Hemant Kumar Committed by Gerrit - the friendly Code Review server
Browse files

usb: gadget: Add a NULL check for desc header pointer



config_ep_by_speed() API iterates over the ep descs of the
desc list even if desc list is pointing to NULL. This causes
NULL pointer dereference if ep desc is not provided by a
function driver for a particular gadget speed. Fix this by
skipping the ep desc iteration and returning error instead.

Change-Id: Iad487279e1d37fed99126e8a467cfa0a8ef844b0
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 7d094449
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