Re: [PATCH v2 2/2] clocksource: Add Intel Keem Bay Timer Support

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

 



On Tue, Jan 19, 2021 at 02:56:36AM +0000, Ayyathurai, Vijayakannan wrote:

...

> > > +	data.base = of_iomap(np, 2);
> > > +	if (!data.base)
> > > +		return -ENXIO;
> > > +
> > > +	ret = keembay_clocksource_init(np, &data);
> > > +	if (ret)
> > > +		goto exit;
> > > +
> > > +	ret = keembay_clockevent_init(np, &data);
> > 
> > Is this missing ?
> > 
> 
> Yes. Either case it goes to the exit path. So I thought of avoiding this error handling code.

The point is that in success you probably won't call keembay_timer_cleanup().

> > 	if (ret)
> > 		goto exit;
> > 
> > 	return 0;
> > 
> > > +exit:
> > > +	keembay_timer_cleanup(np, &data);
> > > +
> > > +	return ret;
> > > +}

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux