USB: Fix gadget_wrapper NULL pointer bug.

This commit is contained in:
wlf
2014-04-01 14:29:31 +08:00
parent 155855ecb7
commit 5bbd230128

View File

@@ -1616,7 +1616,9 @@ int dwc_vbus_status( void )
{
#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;