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>] [day] [month] [year] [list]
Message-Id: <20230517161356.11416-1-osmtendev@gmail.com>
Date:   Wed, 17 May 2023 21:13:56 +0500
From:   Osama Muhammad <osmtendev@...il.com>
To:     thierry.reding@...il.com, jonathanh@...dia.com,
        petlozup@...dia.com, stefank@...dia.com, sushilkumars@...dia.com,
        christophe.jaillet@...adoo.fr, viresh.kumar@...aro.org,
        dmitry.osipenko@...labora.com
Cc:     linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
        Osama Muhammad <osmtendev@...il.com>
Subject: [PATCH] soc/pmc.c: Fix error checking for debugfs_create_dir

This patch fixes the error checking in pmc.c in
debugfs_create_dir. The correct way to check if an error occurred
is 'IS_ERR' inline function.

Signed-off-by: Osama Muhammad <osmtendev@...il.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 5d17799524c9..ac468e4a225c 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -1194,7 +1194,7 @@ static int tegra_powergate_debugfs_init(void)
 {
 	pmc->debugfs = debugfs_create_file("powergate", S_IRUGO, NULL, NULL,
 					   &powergate_fops);
-	if (!pmc->debugfs)
+	if (IS_ERR(pmc->debugfs))
 		return -ENOMEM;
 
 	return 0;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ