USB: android: Create android_usb sysfs in android_probe() rather in init()

If the usb_composite_probe() function fails, then accessing of sysfs
entries which are created in init() may lead to NULL pointer dereference
crash.

So create the class and sysfs entries in device probe instead of
module_init to prevent accessing sysfs files when probe fails.

Change-Id: Ifc29c4c9608987d29f31313c67716cd0b79b6bf4
CRs-Fixed: 351959
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
1 file changed