From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ralf Baechle <ralf@linux-mips.org>,
Paul Burton <paul.burton@mips.com>,
James Hogan <jhogan@kernel.org>, John Crispin <john@phrozen.org>
Cc: linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 2/5] mips: ralink: no need to check return value of debugfs_create functions
Date: Tue, 22 Jan 2019 15:57:39 +0100 [thread overview]
Message-ID: <20190122145742.11292-3-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20190122145742.11292-1-gregkh@linuxfoundation.org>
When calling debugfs functions, there is no need to ever check the
return value. The function can work or not, but the code logic should
never do something different based on this.
Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/ralink/bootrom.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/mips/ralink/bootrom.c b/arch/mips/ralink/bootrom.c
index e1fa5972a81d..648f5eb2ba68 100644
--- a/arch/mips/ralink/bootrom.c
+++ b/arch/mips/ralink/bootrom.c
@@ -35,13 +35,7 @@ static const struct file_operations bootrom_file_ops = {
static int bootrom_setup(void)
{
- if (!debugfs_create_file("bootrom", 0444,
- NULL, NULL, &bootrom_file_ops)) {
- pr_err("Failed to create bootrom debugfs file\n");
-
- return -EINVAL;
- }
-
+ debugfs_create_file("bootrom", 0444, NULL, NULL, &bootrom_file_ops);
return 0;
}
--
2.20.1
next prev parent reply other threads:[~2019-01-22 14:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 14:57 [PATCH 0/5] mips: cleanup debugfs usage Greg Kroah-Hartman
2019-01-22 14:57 ` [PATCH 1/5] mips: cavium: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-01-22 18:48 ` Aaro Koskinen
2019-01-22 19:22 ` Paul Burton
2019-01-22 19:29 ` Greg Kroah-Hartman
2019-01-22 19:45 ` Paul Burton
2019-01-22 14:57 ` Greg Kroah-Hartman [this message]
2019-01-22 14:57 ` [PATCH 3/5] mips: mm: " Greg Kroah-Hartman
2019-01-22 14:57 ` [PATCH 4/5] mips: math-emu: " Greg Kroah-Hartman
2019-01-22 14:57 ` [PATCH 5/5] mips: kernel: " Greg Kroah-Hartman
2019-01-23 1:34 ` [PATCH 0/5] mips: cleanup debugfs usage Paul Burton
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=20190122145742.11292-3-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=jhogan@kernel.org \
--cc=john@phrozen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul.burton@mips.com \
--cc=ralf@linux-mips.org \
/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 NNTP newsgroup(s).