Revert "s390/zcore: no need to check return value of debugfs_create functions"
This reverts commit 638d4f23f7
.
This commit is contained in:
parent
0d62b35c45
commit
8cfff74683
1 changed files with 17 additions and 1 deletions
|
@ -302,12 +302,28 @@ static int __init zcore_init(void)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
zcore_dir = debugfs_create_dir("zcore" , NULL);
|
zcore_dir = debugfs_create_dir("zcore" , NULL);
|
||||||
|
if (!zcore_dir) {
|
||||||
|
rc = -ENOMEM;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
zcore_reipl_file = debugfs_create_file("reipl", S_IRUSR, zcore_dir,
|
zcore_reipl_file = debugfs_create_file("reipl", S_IRUSR, zcore_dir,
|
||||||
NULL, &zcore_reipl_fops);
|
NULL, &zcore_reipl_fops);
|
||||||
|
if (!zcore_reipl_file) {
|
||||||
|
rc = -ENOMEM;
|
||||||
|
goto fail_dir;
|
||||||
|
}
|
||||||
zcore_hsa_file = debugfs_create_file("hsa", S_IRUSR|S_IWUSR, zcore_dir,
|
zcore_hsa_file = debugfs_create_file("hsa", S_IRUSR|S_IWUSR, zcore_dir,
|
||||||
NULL, &zcore_hsa_fops);
|
NULL, &zcore_hsa_fops);
|
||||||
|
if (!zcore_hsa_file) {
|
||||||
|
rc = -ENOMEM;
|
||||||
|
goto fail_reipl_file;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
fail_reipl_file:
|
||||||
|
debugfs_remove(zcore_reipl_file);
|
||||||
|
fail_dir:
|
||||||
|
debugfs_remove(zcore_dir);
|
||||||
fail:
|
fail:
|
||||||
diag308(DIAG308_REL_HSA, NULL);
|
diag308(DIAG308_REL_HSA, NULL);
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Reference in a new issue