summaryrefslogtreecommitdiff
path: root/drivers/usb/core/usb.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2018-12-12 11:20:31 -0200
committerGitHub <noreply@github.com>2018-12-12 11:20:31 -0200
commit1e71d8c630cbc0d1f5d762fd019690b5cdb880ae (patch)
tree58b4b37bed385b27fc5956435b2451c760f26f5f /drivers/usb/core/usb.c
parent5f3fecbc0715a70437501e1d85e74726c4f561be (diff)
parentcfbbc7703fff59c67761c93a8b1de29a79f9841c (diff)
Merge pull request #40 from toradex/4.9-2.3.x-imx
4.9 2.3.x imx
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r--drivers/usb/core/usb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index e1ab778e774a..45981e7b278b 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -91,6 +91,8 @@ struct usb_host_interface *usb_find_alt_setting(
struct usb_interface_cache *intf_cache = NULL;
int i;
+ if (!config)
+ return NULL;
for (i = 0; i < config->desc.bNumInterfaces; i++) {
if (config->intf_cache[i]->altsetting[0].desc.bInterfaceNumber
== iface_num) {