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 <b...@alien8.de>
> Cc: Mauro Carvalho Chehab <mche...@kernel.org>
> Cc: linux-e...@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gre...@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.

Reply via email to