[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230726122545.6930-1-machel@vivo.com>
Date: Wed, 26 Jul 2023 20:25:32 +0800
From: Wang Ming <machel@...o.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com, Wang Ming <machel@...o.com>
Subject: [PATCH v2] bus:Fix error checking for debugfs_create_dir()
debugfs_create_dir() does not return NULL,but it is
possible to return error pointer. Most incorrect error checks
were fixed,but the one in mvebu_mbus_debugfs_init() was forgotten.
Fix the remaining error check.
Signed-off-by: Wang Ming <machel@...o.com>
---
drivers/bus/mvebu-mbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index 00cb792bda18..4c514894cc1f 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -993,7 +993,7 @@ static __init int mvebu_mbus_debugfs_init(void)
return 0;
s->debugfs_root = debugfs_create_dir("mvebu-mbus", NULL);
- if (s->debugfs_root) {
+ if (!IS_ERR(s->debugfs_root)) {
s->debugfs_sdram = debugfs_create_file("sdram", S_IRUGO,
s->debugfs_root, NULL,
&mvebu_sdram_debug_fops);
--
2.25.1
Powered by blists - more mailing lists