diff options
author | Mike Lockwood <lockwood@android.com> | 2010-03-17 15:42:29 -0400 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-09-29 17:49:31 -0700 |
commit | 437ae6a946a82f87f1f932e115e4e8cb58dcae5b (patch) | |
tree | 2a3845fd70e2e0ff5f90dfde610c8f89db89f44d /drivers/usb | |
parent | fcf1d6043f34785491cc3f488c6b42e823c7d24b (diff) |
USB: gadget: android: check for null _android_dev in android_register_function()
This fixes a load ordering issue that occurred if a function driver loads before
the android gadget driver is initialized.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/android.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c index 70e48ac3e2a9..3c4d44d663c0 100644 --- a/drivers/usb/gadget/android.c +++ b/drivers/usb/gadget/android.c @@ -313,7 +313,7 @@ void android_register_function(struct android_usb_function *f) /* bind our functions if they have all registered * and the main driver has bound. */ - if (dev->config && _registered_function_count == dev->num_functions) + if (dev && dev->config && _registered_function_count == dev->num_functions) bind_functions(dev); } |