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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 12 Jul 2023 22:07:24 +0800
From:   Wang Ming <machel@...o.com>
To:     Sebastian Reichel <sre@...nel.org>,
        Yang Yingliang <yangyingliang@...wei.com>,
        Wang Ming <machel@...o.com>, Arnd Bergmann <arnd@...db.de>,
        Miaoqian Lin <linmq006@...il.com>,
        Yuan Can <yuancan@...wei.com>, linux-kernel@...r.kernel.org
Cc:     opensource.kernel@...o.com
Subject: [PATCH v1] hsi:controllers:Fix an NULL vs IS_ERR() bug for debugfs_create_dir() in ssi_debug_add_ctrl()

The debugfs_create_dir() function returns error pointers.
It never returns NULL. Most incorrect error checks were fixed,
but the one in ssi_debug_add_ctrl() was forgotten.

Fix the remaining error check.

Signed-off-by: Wang Ming <machel@...o.com>
---
 drivers/hsi/controllers/omap_ssi_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
index 84ba8b875199..a39bf323fb1a 100644
--- a/drivers/hsi/controllers/omap_ssi_core.c
+++ b/drivers/hsi/controllers/omap_ssi_core.c
@@ -115,7 +115,7 @@ static int ssi_debug_add_ctrl(struct hsi_controller *ssi)
 
 	/* SSI controller */
 	omap_ssi->dir = debugfs_create_dir(dev_name(&ssi->device), NULL);
-	if (!omap_ssi->dir)
+	if (IS_ERR(omap_ssi->dir))
 		return -ENOMEM;
 
 	debugfs_create_file("regs", S_IRUGO, omap_ssi->dir, ssi,
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ