]> git.karo-electronics.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>
Fri, 3 Apr 2015 00:02:57 +0000 (09:02 +0900)
commitf9471ff9a895eda926f0ca7b055acc27abed6235
tree8bc3d61f82a9d1c6c54483b103dee2b1fc6db5b1
parent66bee35f29683fc4a9a530a1c56a0ec45e3f7d72
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