On Sun, 11 Feb 2024 at 21:27, Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > Switching to the _scoped() version removes the need for manual > calling of fwnode_handle_put() in the paths where the code > exits the loop early. In this case that's all in error paths. > > A slightly less convincing usecase than many as all the failure paths > are wrapped up in a call to a per fwnode_handle utility function. > The complexity in that function is sufficient that it makes sense to > factor it out even if it this new auto cleanup would enable simpler > returns if the code was inline at the call site. Hence I've left it alone. > > Cc: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> > Cc: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > --- > drivers/iio/adc/qcom-spmi-adc5.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> -- With best wishes Dmitry