Re: [PATCH v1 08/28] leds: lgm-sso: Put fwnode in any case during ->probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 28, 2021 at 12:08:00PM +0200, Pavel Machek wrote:
> > @@ -734,10 +736,15 @@ static int sso_led_dt_parse(struct sso_led_priv *priv)
> >  	if (fw_ssoled) {
> >  		ret = __sso_led_dt_parse(priv, fw_ssoled);
> >  		if (ret)
> > -			return ret;
> > +			goto err_child_out;
> >  	}
> >  
> > +	fwnode_handle_put(fw_ssoled);
> >  	return 0;
> > +
> > +err_child_out:
> > +	fwnode_handle_put(fw_ssoled);
> > +	return ret;
> >  }
> 
> Just delete the return and you get the same effect, no? No need to
> have two exits here.

I prefer to see it clear and follow the same pattern, but if you insist, I can
change in proposed way.

Thanks for review!

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux