[PATCH v1] drivers: edac: Drop unnecessary error check for debugfs_create_dir

Atul Kumar Pant atulpant.linux at gmail.com
Tue Aug 15 13:38:26 PDT 2023


This patch removes the error checking for debugfs_create_dir.
Even if we get an error from this function, other debugfs APIs will
handle the error value and doesn't crash in that case. Hence caller can
safely ignore the errors that occur during the creation of debugfs nodes.

Signed-off-by: Atul Kumar Pant <atulpant.linux at gmail.com>
---
 drivers/edac/zynqmp_edac.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/edac/zynqmp_edac.c b/drivers/edac/zynqmp_edac.c
index cefbbafb945e..a8449f0711d7 100644
--- a/drivers/edac/zynqmp_edac.c
+++ b/drivers/edac/zynqmp_edac.c
@@ -351,8 +351,6 @@ static void setup_debugfs(struct edac_device_ctl_info *edac_dev)
 	struct edac_priv *priv = edac_dev->pvt_info;
 
 	priv->debugfs_dir = edac_debugfs_create_dir("ocm");
-	if (IS_ERR(priv->debugfs_dir))
-		return;
 
 	edac_debugfs_create_x32("inject_fault_count", 0644, priv->debugfs_dir,
 				&priv->fault_injection_cnt);
-- 
2.25.1




More information about the linux-arm-kernel mailing list