Re: [PATCH v2 2/2] i2c: qcom-geni: Simplify error handling in probe function

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

 



> >   	proto = geni_se_read_proto(&gi2c->se);
> >   	if (proto != GENI_SE_I2C) {
> > -		geni_se_resources_off(&gi2c->se);
> > -		clk_disable_unprepare(gi2c->core_clk);
> > -		return dev_err_probe(dev, -ENXIO, "Invalid proto %d\n", proto);
> > +		dev_err_probe(dev, -ENXIO, "Invalid proto %d\n", proto);
> > +		goto err_resources;
> 
> What's about setting ret = -ENXIO before bailing out?

Oh yes, sorry, my bad... I snap changed this patch without
using my brain. It was better in v1 :-)

Thanks Vladimir,
Andi




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

  Powered by Linux