mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	mchehab@kernel.org, djrscally@gmail.com,
	sakari.ailus@linux.intel.com
Subject: Re: [PATCH] media: ov7251: add missing clk_disable_unprepare() on error in ov7251_set_power_on()
Date: Mon, 20 Jun 2022 12:52:46 +0300	[thread overview]
Message-ID: <YrBDbjS8rAGM4t4u@smile.fi.intel.com> (raw)
In-Reply-To: <a6731874-1c72-898e-fe8f-8d08d4a4d74e@huawei.com>

On Mon, Jun 20, 2022 at 04:48:46PM +0800, Yang Yingliang wrote:
> On 2022/6/17 18:20, Andy Shevchenko wrote:
> > On Fri, Jun 17, 2022 at 09:39:43AM +0800, Yang Yingliang wrote:

...

> > >   	if (ret < 0) {
> > >   		dev_err(ov7251->dev, "error during global init\n");
> > > +		clk_disable_unprepare(ov7251->xclk);
> > >   		ov7251_regulators_disable(ov7251);
> > Logically it should go here. Please, read a code above this check.
> Do you mean print the error code on error path ?

The new code, you added, should be in correct order (reversed in comparison to
resource allocation / registration).

> > >   		return ret;
> > >   	}

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-06-20  9:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  1:39 Yang Yingliang
2022-06-17 10:20 ` Andy Shevchenko
2022-06-20  8:48   ` Yang Yingliang
2022-06-20  9:52     ` Andy Shevchenko [this message]
2022-06-17 22:02 ` Daniel Scally

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=YrBDbjS8rAGM4t4u@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=djrscally@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=yangyingliang@huawei.com \
    /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

all inboxes | Powered by JetHome®