summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-lg2ff.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-lg2ff.c')
-rw-r--r--drivers/hid/hid-lg2ff.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/hid/hid-lg2ff.c b/drivers/hid/hid-lg2ff.c
index dd1a6c3a7de6..73d07e35f12a 100644
--- a/drivers/hid/hid-lg2ff.c
+++ b/drivers/hid/hid-lg2ff.c
@@ -50,11 +50,17 @@ int lg2ff_init(struct hid_device *hid)
50{ 50{
51 struct lg2ff_device *lg2ff; 51 struct lg2ff_device *lg2ff;
52 struct hid_report *report; 52 struct hid_report *report;
53 struct hid_input *hidinput = list_entry(hid->inputs.next, 53 struct hid_input *hidinput;
54 struct hid_input, list); 54 struct input_dev *dev;
55 struct input_dev *dev = hidinput->input;
56 int error; 55 int error;
57 56
57 if (list_empty(&hid->inputs)) {
58 hid_err(hid, "no inputs found\n");
59 return -ENODEV;
60 }
61 hidinput = list_entry(hid->inputs.next, struct hid_input, list);
62 dev = hidinput->input;
63
58 /* Check that the report looks ok */ 64 /* Check that the report looks ok */
59 report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7); 65 report = hid_validate_values(hid, HID_OUTPUT_REPORT, 0, 0, 7);
60 if (!report) 66 if (!report)