From a7284b0e75109040791338f807809ec14f096cc6 Mon Sep 17 00:00:00 2001 From: Wang Ming Date: Wed, 19 Jul 2023 14:44:10 +0000 Subject: [PATCH] lib: error-inject: remove error checking for debugfs_create_dir() 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 Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton --- lib/error-inject.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/error-inject.c b/lib/error-inject.c index 32c14770508e..887acd9a6ea6 100644 --- a/lib/error-inject.c +++ b/lib/error-inject.c @@ -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) {