hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/hid/hid-steam.c
....@@ -134,6 +134,11 @@
134134 int ret;
135135
136136 r = steam->hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[0];
137
+ if (!r) {
138
+ hid_err(steam->hdev, "No HID_FEATURE_REPORT submitted - nothing to read\n");
139
+ return -EINVAL;
140
+ }
141
+
137142 if (hid_report_len(r) < 64)
138143 return -EINVAL;
139144
....@@ -165,6 +170,11 @@
165170 int ret;
166171
167172 r = steam->hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[0];
173
+ if (!r) {
174
+ hid_err(steam->hdev, "No HID_FEATURE_REPORT submitted - nothing to read\n");
175
+ return -EINVAL;
176
+ }
177
+
168178 if (hid_report_len(r) < 64)
169179 return -EINVAL;
170180