]> git.itanic.dy.fi Git - linux-stable/commitdiff
iio: dac: ad5755: Add missing fwnode_handle_put()
authorLiang He <windhl@126.com>
Wed, 22 Mar 2023 03:56:27 +0000 (11:56 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 1 Apr 2023 15:41:52 +0000 (16:41 +0100)
In ad5755_parse_fw(), we should add fwnode_handle_put()
when break out of the iteration device_for_each_child_node()
as it will automatically increase and decrease the refcounter.

Fixes: 3ac27afefd5d ("iio:dac:ad5755: Switch to generic firmware properties and drop pdata")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20230322035627.1856421-1-windhl@126.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ad5755.c

index beadfa938d2da856d4d11e2ed322fac52ec433f2..404865e354602cb077393479b77d5e32d45c6b51 100644 (file)
@@ -802,6 +802,7 @@ static struct ad5755_platform_data *ad5755_parse_fw(struct device *dev)
        return pdata;
 
  error_out:
+       fwnode_handle_put(pp);
        devm_kfree(dev, pdata);
        return NULL;
 }