phy: msm: usb: Fix extcon vbus/id notifier_block list corruption

If driver fails to register extcon notifier from probe, it defers
same to work_queue which is invoked when extcon provider becomes
available (psy_nb is used for same). If power_supply notifier call
gets invoked back to back before extcon_register_work could
unregister psy_changed notifier, it results in driver registering
extcon notifier two times without unregister. This causes notifier_nb
list corruption where notifer_nb->next points to itself and any
extcon event later results in inifinite notifer calls causing
watchdog bite.

Change-Id: Ic7963971db198817e5643b6f3968cd8a4bc2e43c
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2 files changed