lkml.org 
[lkml]   [2021]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] driver: pmc_atom: free pmc->regmap when pmc_setup_clks fails
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


\
 
 \ /
  Last update: 2021-12-06 15:14    [W:0.053 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site