lkml.org 
[lkml]   [2021]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 2/2] clocksource: Add Intel Keem Bay Timer Support
Date
Hi Andy,

> From: andriy.shevchenko@linux.intel.com
>
> > > > + 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().
>

Yes. You are right, if I use this error handling code.

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

\
 
 \ /
  Last update: 2021-01-20 20:23    [W:0.079 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site