lib: error-inject: remove error checking for debugfs_create_dir()
authorWang Ming <machel@vivo.com>
Wed, 19 Jul 2023 14:44:10 +0000 (14:44 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:18:55 +0000 (10:18 -0700)
It is expected that most callers should _ignore_ the errors return by
debugfs_create_dir() in ei_debugfs_init().

Link: https://lkml.kernel.org/r/20230719144355.6720-1-machel@vivo.com
Signed-off-by: Wang Ming <machel@vivo.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/error-inject.c

index 32c14770508ecf67230a05feb5f941b4e4d8ca61..887acd9a6ea689d616b793c3a495b3f33d963537 100644 (file)
@@ -217,8 +217,6 @@ static int __init ei_debugfs_init(void)
        struct dentry *dir, *file;
 
        dir = debugfs_create_dir("error_injection", NULL);
-       if (!dir)
-               return -ENOMEM;
 
        file = debugfs_create_file("list", 0444, dir, NULL, &ei_fops);
        if (!file) {