Marcus Folkesson 9d013910df HID: hid-sensor-custom: set fixed size for custom attributes
This is no bugfix (so no Fixes: tag is necessary) as it is
taken care of in hid_sensor_custom_add_attributes().

The motivation for this patch is that:
hid_sensor_custom_field.attr_name and
hid_sensor_custom_field.attrs
has the size of HID_CUSTOM_TOTAL_ATTRS and used in same context.

We compare against HID_CUSTOM_TOTAL_ATTRS when
looping through hid_custom_attrs.

We will silent the smatch error:
hid_sensor_custom_add_attributes() error: buffer overflow
'hid_custom_attrs' 8 <= 10

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-11-21 22:13:40 +01:00
..
2020-11-25 17:40:23 +01:00
2022-08-25 11:46:55 +02:00
2021-05-05 14:39:24 +02:00
2022-07-21 13:47:12 +02:00
2022-02-02 15:12:22 +01:00
2022-02-25 09:36:06 +01:00
2022-08-25 11:32:31 +02:00
2022-08-25 11:32:31 +02:00