]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
extcon: usb-gpio: register extcon device before IRQ registration
authorRobert Baldyga <r.baldyga@samsung.com>
Thu, 2 Apr 2015 13:13:02 +0000 (15:13 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 27 Apr 2015 02:06:05 +0000 (11:06 +0900)
commitbc1aabad39f42fa293f2a944fd9327bba27b59cd
treef7f4527037d92b73b54e1a4c151c6447aa016761
parentb787f68c36d49bb1d9236f403813641efa74a031
extcon: usb-gpio: register extcon device before IRQ registration

IRQ handler touches info->edev, so if interrupt occurs before extcon
device initialization it can cause NULL pointer dereference. Doing extcon
initialization before IRQ handler registration fixes this problem.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-usb-gpio.c