aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r--drivers/hid/hid-core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index ebf57813d31a..dcd60eb3d5ea 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1169,7 +1169,12 @@ EXPORT_SYMBOL_GPL(hid_alloc_report_buf);
1169 1169
1170int hid_set_field(struct hid_field *field, unsigned offset, __s32 value) 1170int hid_set_field(struct hid_field *field, unsigned offset, __s32 value)
1171{ 1171{
1172 unsigned size = field->report_size; 1172 unsigned size;
1173
1174 if (!field)
1175 return -1;
1176
1177 size = field->report_size;
1173 1178
1174 hid_dump_input(field->report->device, field->usage + offset, value); 1179 hid_dump_input(field->report->device, field->usage + offset, value);
1175 1180