iio: dac: ad5770r: Put fwnode in error case during ->probe()
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 10 May 2021 09:56:49 +0000 (12:56 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 22 May 2021 07:32:36 +0000 (08:32 +0100)
commit98b7b0ca0828907dbb706387c11356a45463e2ea
tree5cff69b9442a697ab20c17c84c182668637b8d90
parent2a54c8c9ebc2006bf72554afc84ffc67768979a0
iio: dac: ad5770r: Put fwnode in error case during ->probe()

device_for_each_child_node() bumps a reference counting of a returned variable.
We have to balance it whenever we return to the caller.

Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support")
Cc: Alexandru Tachici <alexandru.tachici@analog.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20210510095649.3302835-1-andy.shevchenko@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ad5770r.c