.. | .. |
---|
134 | 134 | int ret; |
---|
135 | 135 | |
---|
136 | 136 | 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 | + |
---|
137 | 142 | if (hid_report_len(r) < 64) |
---|
138 | 143 | return -EINVAL; |
---|
139 | 144 | |
---|
.. | .. |
---|
165 | 170 | int ret; |
---|
166 | 171 | |
---|
167 | 172 | 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 | + |
---|
168 | 178 | if (hid_report_len(r) < 64) |
---|
169 | 179 | return -EINVAL; |
---|
170 | 180 | |
---|