diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 4f6d676c4224cd19727084e2846f2fd96f03a1e7..e70ac6d16ea8771b0335623f0b099a446f6d3990 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -974,8 +974,8 @@ struct hid_report *hid_validate_values(struct hid_device *hid, * Validating on id 0 means we should examine the first * report in the list. */ - report = list_entry( - hid->report_enum[type].report_list.next, + report = list_first_entry_or_null( + &hid->report_enum[type].report_list, struct hid_report, list); } else { report = hid->report_enum[type].report_id_hash[id];