aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
-rw-r--r--drivers/hid/hid-sensor-hub.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
index 0c93b10b0813..22ec3c69a799 100644
--- a/drivers/hid/hid-sensor-hub.c
+++ b/drivers/hid/hid-sensor-hub.c
@@ -214,9 +214,6 @@ int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
214 struct sensor_hub_data *data = hid_get_drvdata(hsdev->hdev); 214 struct sensor_hub_data *data = hid_get_drvdata(hsdev->hdev);
215 int ret = 0; 215 int ret = 0;
216 216
217 if (report_id < 0)
218 return -EINVAL;
219
220 mutex_lock(&data->mutex); 217 mutex_lock(&data->mutex);
221 report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT); 218 report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT);
222 if (!report || (field_index >= report->maxfield)) { 219 if (!report || (field_index >= report->maxfield)) {
@@ -241,9 +238,6 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
241 struct sensor_hub_data *data = hid_get_drvdata(hsdev->hdev); 238 struct sensor_hub_data *data = hid_get_drvdata(hsdev->hdev);
242 int ret = 0; 239 int ret = 0;
243 240
244 if (report_id < 0)
245 return -EINVAL;
246
247 mutex_lock(&data->mutex); 241 mutex_lock(&data->mutex);
248 report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT); 242 report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT);
249 if (!report || (field_index >= report->maxfield)) { 243 if (!report || (field_index >= report->maxfield)) {
@@ -271,9 +265,6 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev,
271 struct hid_report *report; 265 struct hid_report *report;
272 int ret_val = 0; 266 int ret_val = 0;
273 267
274 if (report_id < 0)
275 return -EINVAL;
276
277 mutex_lock(&data->mutex); 268 mutex_lock(&data->mutex);
278 memset(&data->pending, 0, sizeof(data->pending)); 269 memset(&data->pending, 0, sizeof(data->pending));
279 init_completion(&data->pending.ready); 270 init_completion(&data->pending.ready);