iio: core: Switch to krealloc_array()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 24 Jul 2023 11:02:03 +0000 (14:02 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 29 Jul 2023 11:47:28 +0000 (12:47 +0100)
commit5a0821e0e369b7c1d65bd10251fe42c7a55d74d5
tree22602959dc6c5ab96af6166d45f34df2af999222
parent971ddd4b4db605191fed2b1d13612f3bbf3195b3
iio: core: Switch to krealloc_array()

Let the krealloc_array() copy the original data and
check for a multiplication overflow.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20230724110204.46285-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c