On Sun, Feb 11, 2024 at 07:25:27PM +0000, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > Useful where the fwnode_handle was obtained from a call such as > fwnode_find_reference() as it will safely do nothing if IS_ERR() is true > and will automatically release the reference on the variable leaving > scope. ... > struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode); > void fwnode_handle_put(struct fwnode_handle *fwnode); I would add a blank line here, but it's a minor comment anyway. > +DEFINE_FREE(fwnode_handle, struct fwnode_handle *, > + if (!IS_ERR_OR_NULL(_T)) fwnode_handle_put(_T)) -- With Best Regards, Andy Shevchenko