diff options
| author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2019-11-21 14:01:11 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-13 08:52:40 +0100 |
| commit | 79f08904592c18921969cfcff851b627d69da7bf (patch) | |
| tree | 0565e93989d16478b0a649ae68f23f6ede88c3a8 /include/linux/stacktrace.h | |
| parent | 7c193ed6e1a1276a1b3f6b8b0430cb2892e31740 (diff) | |
Input: Fix memory leak in psxpad_spi_probe
In the implementation of psxpad_spi_probe() the allocated memory for
pdev is leaked if psxpad_spi_init_ff() or input_register_polled_device()
fail. The solution is using device managed allocation, like the one used
for pad. Perform the allocation using
devm_input_allocate_polled_device().
Fixes: 8be193c7b1f4 ("Input: add support for PlayStation 1/2 joypads connected via SPI")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/stacktrace.h')
0 files changed, 0 insertions, 0 deletions
