]> Git Repo - linux.git/commitdiff
HID: hid-sensor-custom: Remove unused variable 'ret'
authorLee Jones <[email protected]>
Fri, 26 Mar 2021 14:34:53 +0000 (14:34 +0000)
committerBenjamin Tissoires <[email protected]>
Wed, 7 Apr 2021 16:46:20 +0000 (18:46 +0200)
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 <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Srinivas Pandruvada <[email protected]>
Cc: Benjamin Tissoires <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Benjamin Tissoires <[email protected]>
drivers/hid/hid-sensor-custom.c

index 2628bc53ed809ca3f434dd53d2436561105d5920..2e6662173a79c0b6f2b6a82496248c5227fce7cc 100644 (file)
@@ -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;
 
This page took 0.060142 seconds and 4 git commands to generate.