Skip to content
Commit 4132f191 authored by Cosmin Tanislav's avatar Cosmin Tanislav Committed by Jonathan Cameron
Browse files

iio: temperature: ltc2983: allocate iio channels once



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: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Fixes: f110f318 ("iio: temperature: Add support for LTC2983")
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221014123724.1401011-2-demonsingur@gmail.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 72b2aa38
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment