Skip to content
Commit 8ca555bd authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

iio: temp: ltc2983: Use __free(fwnode_handle) and device_for_each_node_scoped()



This use of the new cleanup.h scope based freeing infrastructure allows
us to exit directly from error conditions and in the good path with
the reference obtained from fwnode_find_reference() (which may be an error
pointer) automatically released.

Similarly the _scoped() version of device_for_each_child_node()
removes the need for the manual calling of fwnode_handl_put() in
paths where the code exits the loop early.

Tidy up some unusual indentation in a dev_dbg() whilst here.

Reviewed-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240224123215.161469-2-jic23@kernel.org
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent e1186ee3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment