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 GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux