]> 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)
commit241a5f6205a51b65bd386e839c7bf574b8610259
treebb117a473c186aa8263dc44a0459cf4ae9b7defc
parentd60612fbd78fdefae909e7c671e64b6cef4232ee
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