iio: ltc2983: Fix of_node refcounting
authorNuno Sá <nuno.sa@analog.com>
Fri, 25 Sep 2020 09:10:44 +0000 (11:10 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 29 Sep 2020 16:34:18 +0000 (17:34 +0100)
commitb07c47bfab6f5c4c7182d23e854bbceaf7829c85
treebb37dea454631b9167bb90ab350bcabf25ffaa98
parentbbbeac88fb3540b9421c90866a04a7a89cc6adab
iio: ltc2983: Fix of_node refcounting

When returning or breaking early from a
`for_each_available_child_of_node()` loop, we need to explicitly call
`of_node_put()` on the child node to possibly release the node.

Fixes: f110f3188e563 ("iio: temperature: Add support for LTC2983")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200925091045.302-1-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/temperature/ltc2983.c