mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
UPSTREAM: HID: bigbenff: prevent null pointer dereference
When emulating the device through uhid, there is a chance we don't have output reports and so report_field is null. Cc: [email protected] Signed-off-by: Benjamin Tissoires <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 918aa1ef104d286d16b9e7ef139a463ac7a296f0) Bug: 188677105 Signed-off-by: Greg Kroah-Hartman <[email protected]> Change-Id: Ia6fb77a7bd9426ce055e090fb2c1f3a21a2011cc
This commit is contained in:
parent
56eb2fdbc1
commit
3b49ff9fcb
1 changed files with 1 additions and 1 deletions
|
|
@ -191,7 +191,7 @@ static void bigben_worker(struct work_struct *work)
|
|||
struct bigben_device, worker);
|
||||
struct hid_field *report_field = bigben->report->field[0];
|
||||
|
||||
if (bigben->removed)
|
||||
if (bigben->removed || !report_field)
|
||||
return;
|
||||
|
||||
if (bigben->work_led) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue