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:
Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment