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.

Signed-off-by: Benjamin Tissoires <>
Reviewed-by: Greg Kroah-Hartman <>
(cherry picked from commit 918aa1ef104d286d16b9e7ef139a463ac7a296f0)
Bug: 188677105
Signed-off-by: Greg Kroah-Hartman <>
Change-Id: Ia6fb77a7bd9426ce055e090fb2c1f3a21a2011cc
diff --git a/drivers/hid/hid-bigbenff.c b/drivers/hid/hid-bigbenff.c
index db6da21..74ad8bf 100644
--- a/drivers/hid/hid-bigbenff.c
+++ b/drivers/hid/hid-bigbenff.c
@@ -191,7 +191,7 @@
 		struct bigben_device, worker);
 	struct hid_field *report_field = bigben->report->field[0];
-	if (bigben->removed)
+	if (bigben->removed || !report_field)
 	if (bigben->work_led) {