summaryrefslogtreecommitdiff
path: root/arch/s390/hypfs
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2010-10-29 16:50:39 +0200
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-10-29 16:50:50 +0200
commit3c8ebca0453c71a2a8be79e6dd40e7be2d6167cb (patch)
tree7ebee2073ac4bd32638931fadadcfc22a4855675 /arch/s390/hypfs
parent0b52783d4feb14d6ff990a63512a66d6131d41f9 (diff)
[S390] hypfs: Fix error handling in hypfs_diag initialization
Fix the following two error handling bugs in hypfs_diag_init(): * No need for calling diag204_free_buffer() * Initialize name table only in case of LPAR and prevent error message on non-LPAR systems. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/hypfs')
-rw-r--r--arch/s390/hypfs/hypfs_diag.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index 020e51c063d2..cd4a81be9cf8 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -638,18 +638,21 @@ __init int hypfs_diag_init(void)
pr_err("The hardware system does not support hypfs\n");
return -ENODATA;
}
- rc = diag224_get_name_table();
- if (rc) {
- diag204_free_buffer();
- pr_err("The hardware system does not provide all "
- "functions required by hypfs\n");
- }
if (diag204_info_type == INFO_EXT) {
rc = hypfs_dbfs_init();
if (rc)
- diag204_free_buffer();
+ return rc;
}
- return rc;
+ if (MACHINE_IS_LPAR) {
+ rc = diag224_get_name_table();
+ if (rc) {
+ pr_err("The hardware system does not provide all "
+ "functions required by hypfs\n");
+ debugfs_remove(dbfs_d204_file);
+ return rc;
+ }
+ }
+ return 0;
}
void hypfs_diag_exit(void)