From: Borislav Petkov <bp@alien8.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-edac@vger.kernel.org
Subject: Re: [PATCH] edac: no need to check return value of debugfs_create functions
Date: Wed, 23 Jan 2019 10:42:50 +0100 [thread overview]
Message-ID: <20190123094250.GA3227@zn.tnic> (raw)
In-Reply-To: <20190122152151.16139-17-gregkh@linuxfoundation.org>
On Tue, Jan 22, 2019 at 04:21:16PM +0100, Greg Kroah-Hartman wrote:
> 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: Borislav Petkov <bp@alien8.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: linux-edac@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/edac/debugfs.c | 45 ++++++++++----------------------------
> drivers/edac/edac_module.h | 4 ++--
> 2 files changed, 13 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/edac/debugfs.c b/drivers/edac/debugfs.c
> index 92dbb7e2320c..fd27ea0453a3 100644
> --- a/drivers/edac/debugfs.c
> +++ b/drivers/edac/debugfs.c
> @@ -44,10 +44,6 @@ static const struct file_operations debug_fake_inject_fops = {
> int __init edac_debugfs_init(void)
> {
> edac_debugfs = debugfs_create_dir("edac", NULL);
> - if (IS_ERR(edac_debugfs)) {
> - edac_debugfs = NULL;
> - return -ENOMEM;
> - }
> return 0;
> }
Applied after making that function void too.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
prev parent reply other threads:[~2019-01-23 9:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 15:21 [PATCH] edac: no need to check return value of debugfs_create functions Greg Kroah-Hartman
2019-01-23 9:42 ` Borislav Petkov [this message]
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=20190123094250.GA3227@zn.tnic \
--to=bp@alien8.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.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