linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "andriy.shevchenko@linux.intel.com"  <andriy.shevchenko@linux.intel.com>
To: "Ayyathurai, Vijayakannan" <vijayakannan.ayyathurai@intel.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"will@kernel.org" <will@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mgross@linux.intel.com" <mgross@linux.intel.com>,
	"Wan Mohamad,
	Wan Ahmad Zainie"  <wan.ahmad.zainie.wan.mohamad@intel.com>,
	"Raja Subramanian,
	Lakshmi Bai"  <lakshmi.bai.raja.subramanian@intel.com>,
	"Seow, Chen Yong" <chen.yong.seow@intel.com>
Subject: Re: [PATCH v2 2/2] clocksource: Add Intel Keem Bay Timer Support
Date: Tue, 19 Jan 2021 10:50:50 +0200	[thread overview]
Message-ID: <20210119085050.GM4077@smile.fi.intel.com> (raw)
In-Reply-To: <DM6PR11MB4250EB33E23178D211D0411DFBA30@DM6PR11MB4250.namprd11.prod.outlook.com>

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



  reply	other threads:[~2021-01-19  8:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30  6:25 [PATCH v2 0/2] Add drivers for Intel Keem Bay SoC timer block vijayakannan.ayyathurai
2020-12-30  6:25 ` [PATCH v2 1/2] dt-bindings: timer: Add bindings for Intel Keem Bay SoC timer vijayakannan.ayyathurai
2020-12-31 15:34   ` Rob Herring
2021-01-01 16:12     ` Ayyathurai, Vijayakannan
2020-12-30  6:25 ` [PATCH v2 2/2] clocksource: Add Intel Keem Bay Timer Support vijayakannan.ayyathurai
2021-01-18 15:56   ` Daniel Lezcano
2021-01-19  2:56     ` Ayyathurai, Vijayakannan
2021-01-19  8:50       ` andriy.shevchenko [this message]
2021-01-20 19:18         ` Ayyathurai, Vijayakannan
2021-01-13 10:54 ` [PATCH v2 0/2] Add drivers for Intel Keem Bay SoC timer block Ayyathurai, Vijayakannan
2021-01-18 15:34   ` Daniel Lezcano
2021-01-19  1:55     ` Ayyathurai, Vijayakannan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210119085050.GM4077@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=chen.yong.seow@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=vijayakannan.ayyathurai@intel.com \
    --cc=wan.ahmad.zainie.wan.mohamad@intel.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).