diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-09-14 06:53:46 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-09-18 21:50:44 +0100 |
commit | 24db0d75d3666b2aa5950a8bec0c1898929f2945 (patch) | |
tree | 629d27c8cc674b9dc525ae80d0d8cfcd4c356a93 /drivers/hid | |
parent | 2b7c4b8e3edfd109a8423ff593a12a5fe09615b2 (diff) | |
download | linux-stable-24db0d75d3666b2aa5950a8bec0c1898929f2945.tar.gz linux-stable-24db0d75d3666b2aa5950a8bec0c1898929f2945.tar.bz2 linux-stable-24db0d75d3666b2aa5950a8bec0c1898929f2945.zip |
HID: sensors: remove some unneeded checks
"report_id" is unsigned so it's never less than zero. These checks can
be removed without any problem.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-sensor-hub.c | 9 |
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, struct sensor_hub_data *data = hid_get_drvdata(hsdev->hdev); int ret = 0; - if (report_id < 0) - return -EINVAL; - mutex_lock(&data->mutex); report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT); if (!report || (field_index >= report->maxfield)) { @@ -241,9 +238,6 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, struct sensor_hub_data *data = hid_get_drvdata(hsdev->hdev); int ret = 0; - if (report_id < 0) - return -EINVAL; - mutex_lock(&data->mutex); report = sensor_hub_report(report_id, hsdev->hdev, HID_FEATURE_REPORT); if (!report || (field_index >= report->maxfield)) { @@ -271,9 +265,6 @@ int sensor_hub_input_attr_get_raw_value(struct hid_sensor_hub_device *hsdev, struct hid_report *report; int ret_val = 0; - if (report_id < 0) - return -EINVAL; - mutex_lock(&data->mutex); memset(&data->pending, 0, sizeof(data->pending)); init_completion(&data->pending.ready); |