Skip to content

Commit dbf104f

Browse files
Lee Jonesbentiss
authored andcommitted
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 <[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]>
1 parent 5abb544 commit dbf104f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/hid/hid-sensor-custom.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,15 +397,14 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr,
397397

398398
if (!strncmp(name, "value", strlen("value"))) {
399399
u32 report_id;
400-
int ret;
401400

402401
if (kstrtoint(buf, 0, &value) != 0)
403402
return -EINVAL;
404403

405404
report_id = sensor_inst->fields[field_index].attribute.
406405
report_id;
407-
ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id,
408-
index, sizeof(value), &value);
406+
sensor_hub_set_feature(sensor_inst->hsdev, report_id,
407+
index, sizeof(value), &value);
409408
} else
410409
return -EINVAL;
411410

0 commit comments

Comments
 (0)