|
@@ -201,7 +201,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
|
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
|
|
if (val1 < 0 || val2 < 0)
|
|
if (val1 < 0 || val2 < 0)
|
|
|
- ret = -EINVAL;
|
|
|
|
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
|
|
value = val1 * pow_10(6) + val2;
|
|
value = val1 * pow_10(6) + val2;
|
|
|
if (value) {
|
|
if (value) {
|
|
@@ -250,6 +250,9 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
|
|
|
s32 value;
|
|
s32 value;
|
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
|
|
|
|
+ if (val1 < 0 || val2 < 0)
|
|
|
|
|
+ return -EINVAL;
|
|
|
|
|
+
|
|
|
value = convert_to_vtf_format(st->sensitivity.size,
|
|
value = convert_to_vtf_format(st->sensitivity.size,
|
|
|
st->sensitivity.unit_expo,
|
|
st->sensitivity.unit_expo,
|
|
|
val1, val2);
|
|
val1, val2);
|