mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 01:43:18 +00:00
Currently, every time the device wakes up from sleep, the
iio_chan array is reallocated, leaking the previous one
until the device is removed (basically never).
Move the allocation to the probe function to avoid this.
Signed-off-by: Cosmin Tanislav <[email protected]>
Fixes: f110f3188e ("iio: temperature: Add support for LTC2983")
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>