diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-14 10:07:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-14 10:07:45 +0300 |
commit | 68afbd8459e9c8a86544b5e884041981b837e162 (patch) | |
tree | d469492c943d94ed2654c35dfdf663671c6cde3d /drivers/hid/hid-sensor-custom.c | |
parent | 5a576764e4190f7b48cf3cf40f4294f001918605 (diff) | |
parent | 009c9aa5be652675a06d5211e1640e02bbb1c33d (diff) | |
download | linux-68afbd8459e9c8a86544b5e884041981b837e162.tar.xz |
Merge tag 'v5.13-rc6' into driver-core-next
We need the driver core fix in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hid/hid-sensor-custom.c')
-rw-r--r-- | drivers/hid/hid-sensor-custom.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c index 2e6662173a79..32c2306e240d 100644 --- a/drivers/hid/hid-sensor-custom.c +++ b/drivers/hid/hid-sensor-custom.c @@ -387,7 +387,7 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr, struct hid_sensor_custom *sensor_inst = dev_get_drvdata(dev); int index, field_index, usage; char name[HID_CUSTOM_NAME_LENGTH]; - int value; + int value, ret; if (sscanf(attr->attr.name, "feature-%x-%x-%s", &index, &usage, name) == 3) { @@ -403,8 +403,10 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr, report_id = sensor_inst->fields[field_index].attribute. report_id; - sensor_hub_set_feature(sensor_inst->hsdev, report_id, - index, sizeof(value), &value); + ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id, + index, sizeof(value), &value); + if (ret) + return ret; } else return -EINVAL; |