lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211130143526.1820249-1-mudongliangabcd@gmail.com>
Date:   Tue, 30 Nov 2021 22:35:25 +0800
From:   Dongliang Mu <mudongliangabcd@...il.com>
To:     Hans de Goede <hdegoede@...hat.com>,
        Mark Gross <markgross@...nel.org>
Cc:     Dongliang Mu <mudongliangabcd@...il.com>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] driver: pmc_atom: free pmc->regmap in pmc_setup_dev

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.

CC: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
---
 drivers/platform/x86/pmc_atom.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/pmc_atom.c b/drivers/platform/x86/pmc_atom.c
index a9d2a4b98e57..95ba108ed716 100644
--- a/drivers/platform/x86/pmc_atom.c
+++ b/drivers/platform/x86/pmc_atom.c
@@ -492,6 +492,7 @@ static int pmc_setup_dev(struct pci_dev *pdev, const struct pci_device_id *ent)
 		dev_warn(&pdev->dev, "platform clocks register failed: %d\n",
 			 ret);
 
+	iounmap(pmc->regmap);
 	pmc->init = true;
 	return ret;
 }
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ