mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
usb: otg: nop: fix oops triggered by otg_register_notifier
This patch adds BLOCKING_INIT_NOTIFIER_HEAD in nop_usb_xceiv_probe, so that we can avoid oops caused by uninitialized nop->otg.notifier.rwsem which will be touched in otg_register_notifier path. Reported-by: Gupta, Ajay Kumar <[email protected]> Tested-by: Gupta, Ajay Kumar <[email protected]> Cc: Balbi, Felipe <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
0cdfb819b6
commit
20831ad239
1 changed files with 2 additions and 0 deletions
|
|
@ -132,6 +132,8 @@ static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, nop);
|
||||
|
||||
BLOCKING_INIT_NOTIFIER_HEAD(&nop->otg.notifier);
|
||||
|
||||
return 0;
|
||||
exit:
|
||||
kfree(nop);
|
||||
|
|
|
|||
Loading…
Reference in a new issue