The platform code for USB OTG is not currently installed in our build, but USB OTG and Android Gadget support is configured. During the init() call Android USB gadget will install the sysfs entries: functions, enable, and state
If the probe() function fails or the probe function is not called missing platform device definition, the sysfs entry points will still be instantiated. Later on init.rc will write one to /sys/class/android_usb/android0/ enable which will cause a NULL pointer dereference due to the fact pdev private data is not initialized (in enable_store). The sysfs entries should be instantiated only if the probe occurs successfully and if probe fails cleanup should occur for any sysfs entries that were added. -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel