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]
Date:   Tue, 6 Sep 2022 13:51:17 +0000
From:   Petlozu Pravareshwar <petlozup@...dia.com>
To:     <jonathanh@...dia.com>, <thierry.reding@...il.com>,
        <p.zabel@...gutronix.de>, <dmitry.osipenko@...labora.com>,
        <ulf.hansson@...aro.org>, <kkartik@...dia.com>,
        <cai.huoqing@...ux.dev>, <spatra@...dia.com>,
        <linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <petlozup@...dia.com>, Manish Bhardwaj <mbhardwaj@...dia.com>
Subject: [PATCH] soc/tegra: pmc: Check device node status property

In early_initcall, check if PMC device is available for use
and avoid accessing PMC resources if the device node status
property is set to disabled.

Signed-off-by: Manish Bhardwaj <mbhardwaj@...dia.com>
Signed-off-by: Petlozu Pravareshwar <petlozup@...dia.com>
---
 drivers/soc/tegra/pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 6a86961477e8..8c7b46ac6ad6 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -4295,7 +4295,7 @@ static int __init tegra_pmc_early_init(void)
 		return -ENXIO;
 	}
 
-	if (np) {
+	if (of_device_is_available(np)) {
 		pmc->soc = match->data;
 
 		if (pmc->soc->maybe_tz_only)
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ