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)
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>

No differences found