rc = -ENOMEM;
einj_debug_dir = debugfs_create_dir("einj", apei_get_debugfs_dir());
- if (!einj_debug_dir) {
- pr_err("Error creating debugfs node.\n");
- goto err_cleanup;
- }
- fentry = debugfs_create_file("available_error_type", S_IRUSR,
- einj_debug_dir, NULL,
- &available_error_type_fops);
- if (!fentry)
- goto err_cleanup;
-
- fentry = debugfs_create_file_unsafe("error_type", 0600,
- einj_debug_dir, NULL,
- &error_type_fops);
- if (!fentry)
- goto err_cleanup;
- fentry = debugfs_create_file_unsafe("error_inject", 0200,
- einj_debug_dir, NULL,
- &error_inject_fops);
- if (!fentry)
- goto err_cleanup;
+ debugfs_create_file("available_error_type", S_IRUSR, einj_debug_dir,
+ NULL, &available_error_type_fops);
- debugfs_create_file("error_type", S_IRUSR | S_IWUSR, einj_debug_dir,
- NULL, &error_type_fops);
- debugfs_create_file("error_inject", S_IWUSR, einj_debug_dir,
- NULL, &error_inject_fops);
++ debugfs_create_file_unsafe("error_type", 0600, einj_debug_dir,
++ NULL, &error_type_fops);
++ debugfs_create_file_unsafe("error_inject", 0200, einj_debug_dir,
++ NULL, &error_inject_fops);
apei_resources_init(&einj_resources);
einj_exec_ctx_init(&ctx);