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: <CY5PR12MB64550ACC0B90FDD120D21E47C6E4A@CY5PR12MB6455.namprd12.prod.outlook.com>
Date:   Fri,  1 Sep 2023 22:49:12 +0530
From:   mirimmad@...look.com
To:     unlisted-recipients:; (no To-header on input)
Cc:     gregkh@...uxfoundation.org, Immad Mir <mirimmad17@...il.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        linuxppc-dev@...ts.ozlabs.org (open list:LINUX FOR POWERPC (32-BIT AND
        64-BIT)), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] powerpc/powernv: use appropiate error code

From: Immad Mir <mirimmad17@...il.com>

-1 is not a valid error code. This patch replaces it with -EPERM.

Signed-off-by: Immad Mir <mirimmad17@...il.com>
---
 arch/powerpc/platforms/powernv/opal-xscom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal-xscom.c b/arch/powerpc/platforms/powernv/opal-xscom.c
index 262cd6fac..ce4b089dd 100644
--- a/arch/powerpc/platforms/powernv/opal-xscom.c
+++ b/arch/powerpc/platforms/powernv/opal-xscom.c
@@ -171,7 +171,7 @@ static int scom_debug_init_one(struct dentry *root, struct device_node *dn,
 	if (IS_ERR(dir)) {
 		kfree(ent->path.data);
 		kfree(ent);
-		return -1;
+		return -EPERM;
 	}

 	debugfs_create_blob("devspec", 0400, dir, &ent->path);
@@ -191,7 +191,7 @@ static int scom_debug_init(void)

 	root = debugfs_create_dir("scom", arch_debugfs_dir);
 	if (IS_ERR(root))
-		return -1;
+		return -EPERM;

 	rc = 0;
 	for_each_node_with_property(dn, "scom-controller") {
--
2.40.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ