]> git.baikalelectronics.ru Git - kernel.git/commit
Input: pxrc - fix freeing URB on device teardown
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 18 Jul 2018 18:03:36 +0000 (18:03 +0000)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 25 Jul 2018 19:04:15 +0000 (19:04 +0000)
commit1d4ec51cc5857c71f70714ddf68e50216cf4c81d
treebb117a473c186aa8263dc44a0459cf4ae9b7defc
parent80dc3490a3e3bcad146e316e0e6fc5e07d84d952
Input: pxrc - fix freeing URB on device teardown

URB is the only resource that is not managed, and thus is destroyed too early,
before we unregister input device and stop URB in pxrc_close(). To fix it let's
install custom devm handler to free the URB at the right time in devm unwind
sequence.

Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Tested-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/pxrc.c