linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] drivers: edac: Drop unnecessary error check for debugfs_create_dir
@ 2023-08-15 20:38 Atul Kumar Pant
  2023-08-25  7:31 ` Michal Simek
  0 siblings, 1 reply; 5+ messages in thread
From: Atul Kumar Pant @ 2023-08-15 20:38 UTC (permalink / raw)
  To: shubhrajyoti.datta, sai.krishna.potthuri, bp, tony.luck,
	james.morse, mchehab, rric, michal.simek
  Cc: Atul Kumar Pant, linux-edac, linux-kernel, linux-arm-kernel,
	shuah

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@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-31  4:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-15 20:38 [PATCH v1] drivers: edac: Drop unnecessary error check for debugfs_create_dir Atul Kumar Pant
2023-08-25  7:31 ` Michal Simek
2023-08-28 13:35   ` Atul Kumar Pant
2023-08-28 14:00     ` Michal Simek
2023-08-31  4:20       ` Atul Kumar Pant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).