summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-bigbenff.c
AgeCommit message (Collapse)Author
2021-12-02HID: bigbenff: prevent null pointer dereferenceBenjamin Tissoires
When emulating the device through uhid, there is a chance we don't have output reports and so report_field is null. Cc: stable@vger.kernel.org Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20211202095334.14399-3-benjamin.tissoires@redhat.com
2020-02-18HID: hid-bigbenff: fix race condition for scheduled work during removalHanno Zulla
It's possible that there is scheduled work left while the device is already being removed, which can cause a kernel crash. Adding a flag will avoid this. Signed-off-by: Hanno Zulla <kontakt@hanno.de> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2020-02-18HID: hid-bigbenff: call hid_hw_stop() in case of errorHanno Zulla
It's required to call hid_hw_stop() once hid_hw_start() was called previously, so error cases need to handle this. Also, hid_hw_close() is not necessary during removal. Signed-off-by: Hanno Zulla <kontakt@hanno.de> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2020-02-18HID: hid-bigbenff: fix general protection fault caused by double kfreeHanno Zulla
The struct *bigben was allocated via devm_kzalloc() and then used as a parameter in input_ff_create_memless(). This caused a double kfree during removal of the device, since both the managed resource API and ml_ff_destroy() in drivers/input/ff-memless.c would call kfree() on it. Signed-off-by: Hanno Zulla <kontakt@hanno.de> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2018-09-24HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepadHanno Zulla
This is a driver to fix input mapping and add LED & force feedback support for the "BigBen Interactive Kid-friendly Wired Controller PS3OFMINIPAD SONY" gamepad with USB id 146b:0902. It was originally sold as a PS3 accessory and makes a very nice gamepad for Retropie. Signed-off-by: Hanno Zulla <kontakt@hanno.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>