projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f620564
)
USB: gadget: android: check for null _android_dev in android_register_function()
author
Mike Lockwood
<lockwood@android.com>
Wed, 17 Mar 2010 19:42:29 +0000
(15:42 -0400)
committer
Colin Cross
<ccross@android.com>
Tue, 14 Jun 2011 16:09:06 +0000
(09:09 -0700)
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>
drivers/usb/gadget/android.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/android.c
b/drivers/usb/gadget/android.c
index 70e48ac3e2a9d666fcc0ae16d1058996277ce241..3c4d44d663c0c79909a1436cabe76818137bb1e5 100644
(file)
--- 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);
}