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

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

 



Hi Mukesh,

On Wed, Dec 11, 2024 at 09:26:53AM +0530, Mukesh Kumar Savaliya wrote:
> Thanks Andi for this change !

Thanks for looking into it.

...

> > @@ -944,8 +938,16 @@ static int geni_i2c_probe(struct platform_device *pdev)
> >   	return 0;
> return ret here ? yes, we need to initialize ret = 0.

here? It's returning '0', as it was before. I'm failing to see
where 'ret' is used uninitialized. What am I missing?

> > +err_off:
> can we rename as err_resources ?

yes, it's better, as meaning it's more aligned with the other
labels.

Thanks,
Andi

> > +	geni_se_resources_off(&gi2c->se);
> > +err_clk:
> > +	clk_disable_unprepare(gi2c->core_clk);
> > +
> > +	return ret;
> > +
> >   err_dma:
> >   	release_gpi_dma(gi2c);
> > +
> >   	return ret;
> >   }
> 




[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