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:
155855e
)
USB: Fix gadget_wrapper NULL pointer bug.
author
wlf
<wulf@rock-chips.com>
Tue, 1 Apr 2014 06:29:31 +0000
(14:29 +0800)
committer
wlf
<wulf@rock-chips.com>
Tue, 1 Apr 2014 06:29:31 +0000
(14:29 +0800)
drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c
patch
|
blob
|
history
diff --git
a/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c
b/drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c
index 756c5c23b0a2813c6d085d0f11a1ffc647b05b5f..443b839339faa1f0a67c0aa8f3dccd8992e1c311 100755
(executable)
--- a/
drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c
+++ b/
drivers/usb/dwc_otg_310/dwc_otg_pcd_linux.c
@@
-1616,7
+1616,9
@@
int dwc_vbus_status( void )
{
#ifdef CONFIG_USB20_OTG
dwc_otg_pcd_t *pcd = 0;
{
#ifdef CONFIG_USB20_OTG
dwc_otg_pcd_t *pcd = 0;
- pcd = gadget_wrapper->pcd;
+ if(gadget_wrapper){
+ pcd = gadget_wrapper->pcd;
+ }
if(!pcd)
return 0;
if(!pcd)
return 0;