mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dongliang Mu <mudongliangabcd@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <markgross@kernel.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Irina Tirdea <irina.tirdea@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] driver: pmc_atom: free pmc->regmap when pmc_setup_clks fails
Date: Mon, 6 Dec 2021 16:05:42 +0200	[thread overview]
Message-ID: <Ya4Ytr9re/a8oP/6@smile.fi.intel.com> (raw)
In-Reply-To: <20211205084419.2382395-1-mudongliangabcd@gmail.com>

On Sun, Dec 05, 2021 at 04:44:19PM +0800, Dongliang Mu wrote:
> Smatch reports:
> 
> drivers/platform/x86/pmc_atom.c:496
> pmc_setup_dev() warn: 'pmc->regmap' not released on lines: 496.
> 
> Fix this by deallocating pm->regmap when pmc_setup_clks fails.
> 
> Fixes: 282a4e4ce5f9("platform/x86: Enable Atom PMC platform clocks")
> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>

Okay, this driver is two in one, i.e. library for PMC access and some other
stuff. When you do iounmap() you ruin library routines with that.

So, my other comments are fine in general, but not applicable here.

NAK.

-- 
With Best Regards,
Andy Shevchenko



      parent reply	other threads:[~2021-12-06 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-05  8:44 Dongliang Mu
2021-12-06 14:00 ` Andy Shevchenko
2021-12-06 14:01   ` Andy Shevchenko
2021-12-06 14:09   ` Dongliang Mu
2021-12-06 14:05 ` Andy Shevchenko [this message]

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=Ya4Ytr9re/a8oP/6@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=irina.tirdea@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=mudongliangabcd@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sboyd@codeaurora.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

all inboxes | Powered by JetHome®