iio: adc: tsc2046: add sanity check to avoid to big allocations
authorOleksij Rempel <o.rempel@pengutronix.de>
Mon, 17 Jan 2022 08:28:52 +0000 (09:28 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 23 Jan 2022 18:03:37 +0000 (18:03 +0000)
commit576434fd93b91d36cb62d531888e88dac5e52540
tree0ffbd9d6a5c604b467b327a518fb8ab272c1a37c
parentb617693a5d139dec0a3a19a909d687d2d95d78bc
iio: adc: tsc2046: add sanity check to avoid to big allocations

To avoid problematic devicetree configurations. Set allocation limit
with error message and suggestion on what can be done to solve this
issue.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20220117082852.3370869-2-o.rempel@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-tsc2046.c