aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/char/vmcp.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c
index af616aeaa938..401ea84b3059 100644
--- a/drivers/s390/char/vmcp.c
+++ b/drivers/s390/char/vmcp.c
@@ -192,27 +192,23 @@ static int __init vmcp_init(void)
192 PRINT_WARN("z/VM CP interface is only available under z/VM\n"); 192 PRINT_WARN("z/VM CP interface is only available under z/VM\n");
193 return -ENODEV; 193 return -ENODEV;
194 } 194 }
195
195 vmcp_debug = debug_register("vmcp", 1, 1, 240); 196 vmcp_debug = debug_register("vmcp", 1, 1, 240);
196 if (!vmcp_debug) { 197 if (!vmcp_debug)
197 PRINT_ERR("z/VM CP interface not loaded. Could not register "
198 "debug feature\n");
199 return -ENOMEM; 198 return -ENOMEM;
200 } 199
201 ret = debug_register_view(vmcp_debug, &debug_hex_ascii_view); 200 ret = debug_register_view(vmcp_debug, &debug_hex_ascii_view);
202 if (ret) { 201 if (ret) {
203 PRINT_ERR("z/VM CP interface not loaded. Could not register "
204 "debug feature view. Error code: %d\n", ret);
205 debug_unregister(vmcp_debug); 202 debug_unregister(vmcp_debug);
206 return ret; 203 return ret;
207 } 204 }
205
208 ret = misc_register(&vmcp_dev); 206 ret = misc_register(&vmcp_dev);
209 if (ret) { 207 if (ret) {
210 PRINT_ERR("z/VM CP interface not loaded. Could not register "
211 "misc device. Error code: %d\n", ret);
212 debug_unregister(vmcp_debug); 208 debug_unregister(vmcp_debug);
213 return ret; 209 return ret;
214 } 210 }
215 PRINT_INFO("z/VM CP interface loaded\n"); 211
216 return 0; 212 return 0;
217} 213}
218 214
@@ -220,7 +216,6 @@ static void __exit vmcp_exit(void)
220{ 216{
221 misc_deregister(&vmcp_dev); 217 misc_deregister(&vmcp_dev);
222 debug_unregister(vmcp_debug); 218 debug_unregister(vmcp_debug);
223 PRINT_INFO("z/VM CP interface unloaded.\n");
224} 219}
225 220
226module_init(vmcp_init); 221module_init(vmcp_init);