summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-custom.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2021-03-26 15:34:53 +0100
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2021-04-07 18:46:20 +0200
commitdbf104fdd42e49310851fa258ce0493e69dd2221 (patch)
treec5c2571f242ebba9470a006ca356b0f412791bc0 /drivers/hid/hid-sensor-custom.c
parentHID: hid-uclogic-params: Ensure function names are present and correct in ker... (diff)
downloadlinux-dbf104fdd42e49310851fa258ce0493e69dd2221.tar.xz
linux-dbf104fdd42e49310851fa258ce0493e69dd2221.zip
HID: hid-sensor-custom: Remove unused variable 'ret'
Fixes the following W=1 kernel build warning(s): drivers/hid/hid-sensor-custom.c: In function ‘store_value’: drivers/hid/hid-sensor-custom.c:400:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Jiri Kosina <jikos@kernel.org> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: linux-input@vger.kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/hid-sensor-custom.c')
-rw-r--r--drivers/hid/hid-sensor-custom.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
index 2628bc53ed80..2e6662173a79 100644
--- a/drivers/hid/hid-sensor-custom.c
+++ b/drivers/hid/hid-sensor-custom.c
@@ -397,15 +397,14 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr,
if (!strncmp(name, "value", strlen("value"))) {
u32 report_id;
- int ret;
if (kstrtoint(buf, 0, &value) != 0)
return -EINVAL;
report_id = sensor_inst->fields[field_index].attribute.
report_id;
- ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id,
- index, sizeof(value), &value);
+ sensor_hub_set_feature(sensor_inst->hsdev, report_id,
+ index, sizeof(value), &value);
} else
return -EINVAL;