Skip to content

Commit 27d2a2f

Browse files
pietroborrellobentiss
authored andcommitted
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 918aa1e ("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 c7bf714 ("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: 918aa1e ("HID: bigbenff: prevent null pointer dereference") Signed-off-by: Pietro Borrello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 9fefb62 commit 27d2a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-bigbenff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static void bigben_worker(struct work_struct *work)
197197
u32 len;
198198
unsigned long flags;
199199

200-
if (bigben->removed || !report_field)
200+
if (bigben->removed)
201201
return;
202202

203203
buf = hid_alloc_report_buf(bigben->report, GFP_KERNEL);

0 commit comments

Comments
 (0)