Linux-EDAC Archive mirror
 help / color / mirror / Atom feed
From: Atul Kumar Pant <atulpant.linux@gmail.com>
To: shubhrajyoti.datta@amd.com, sai.krishna.potthuri@amd.com,
	bp@alien8.de, tony.luck@intel.com, james.morse@arm.com,
	mchehab@kernel.org, rric@kernel.org, michal.simek@amd.com
Cc: Atul Kumar Pant <atulpant.linux@gmail.com>,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, shuah@kernel.org
Subject: [PATCH v1] drivers: edac: Drop unnecessary error check for debugfs_create_dir
Date: Wed, 16 Aug 2023 02:08:26 +0530	[thread overview]
Message-ID: <20230815203826.51792-1-atulpant.linux@gmail.com> (raw)

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


             reply	other threads:[~2023-08-15 20:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15 20:38 Atul Kumar Pant [this message]
2023-08-25  7:31 ` [PATCH v1] drivers: edac: Drop unnecessary error check for debugfs_create_dir 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230815203826.51792-1-atulpant.linux@gmail.com \
    --to=atulpant.linux@gmail.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=rric@kernel.org \
    --cc=sai.krishna.potthuri@amd.com \
    --cc=shuah@kernel.org \
    --cc=shubhrajyoti.datta@amd.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).