media: dt-bindings: Add regulator to dw9807-vcm
[platform/kernel/linux-rpi.git] / drivers / hid / hid-bigbenff.c
index db6da21..e8c5e3a 100644 (file)
@@ -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) {
@@ -347,6 +347,12 @@ static int bigben_probe(struct hid_device *hid,
        bigben->report = list_entry(report_list->next,
                struct hid_report, list);
 
+       if (list_empty(&hid->inputs)) {
+               hid_err(hid, "no inputs found\n");
+               error = -ENODEV;
+               goto error_hw_stop;
+       }
+
        hidinput = list_first_entry(&hid->inputs, struct hid_input, list);
        set_bit(FF_RUMBLE, hidinput->input->ffbit);