HID: hid-sensor-custom: Fix big on-stack allocation in hid_sensor_custom_get_known()
authorJiri Kosina <jkosina@suse.cz>
Fri, 6 Jan 2023 14:49:55 +0000 (15:49 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 6 Jan 2023 14:49:55 +0000 (15:49 +0100)
commitf1f73651a0849c26b735e7cc1543fa650162b51c
tree50dc9ae0c2605ca1d2c16038359cf4405db60fbe
parentc8aca355bdd56e5dad55897cc419ea5d3e4c0e58
HID: hid-sensor-custom: Fix big on-stack allocation in hid_sensor_custom_get_known()

struct hid_sensor_custom_properties is currently 384 bytes big, which consumes
too much stack space for no good reason. Make it dynamically allocated.

Fixes: 98c062e824519 ("HID: hid-sensor-custom: Allow more custom iio sensors")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sensor-custom.c