Skip to content

Commit

Permalink
iio: dac: ad5755: Add missing fwnode_handle_put()
Browse files Browse the repository at this point in the history
commit ffef737 upstream.

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: 3ac27af ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
windhl authored and gregkh committed Apr 26, 2023
1 parent 9ad34ea commit b263f81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/iio/dac/ad5755.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b263f81

Please sign in to comment.