OSDN Git Service

HID: bigben_worker() remove unneeded check on report_field
authorPietro Borrello <borrello@diag.uniroma1.it>
Sun, 12 Feb 2023 19:00:00 +0000 (19:00 +0000)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 15 Feb 2023 17:18:48 +0000 (18:18 +0100)
commit27d2a2fd844ec7da70d19fabb482304fd1e0595b
treebea7e2485ec52fe993fa808bee0b664e1721b1d4
parent9fefb6201c4f8dd9f58c581b2a66e5cde2895ea2
HID: bigben_worker() remove unneeded check on report_field

bigben_worker() checks report_field to be non-NULL.
The check has been added in commit
918aa1ef104d ("HID: bigbenff: prevent null pointer dereference")
to prevent a NULL pointer crash.
However, the true root cause was a missing check for output
reports, patched in commit
c7bf714f8755 ("HID: check empty report_list in bigben_probe()"),
where the type-confused report list_entry was overlapping with
a NULL pointer, which was then causing the crash.

Fixes: 918aa1ef104d ("HID: bigbenff: prevent null pointer dereference")
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
Link: https://lore.kernel.org/r/20230125-hid-unregister-leds-v4-2-7860c5763c38@diag.uniroma1.it
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/hid-bigbenff.c