Commit 020d5dc5 authored by Heiko Carstens's avatar Heiko Carstens
Browse files

s390/ap: Don't leak debug feature files if AP instructions are not available



If no AP instructions are available the AP bus module leaks registered
debug feature files. Change function call order to fix this.

Fixes: cccd85bf ("s390/zcrypt: Rework debug feature invocations.")
Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent f25d952a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2494,15 +2494,15 @@ static int __init ap_module_init(void)
{
	int rc;

	rc = ap_debug_init();
	if (rc)
		return rc;

	if (!ap_instructions_available()) {
		pr_warn("The hardware system does not support AP instructions\n");
		return -ENODEV;
	}

	rc = ap_debug_init();
	if (rc)
		return rc;

	/* init ap_queue hashtable */
	hash_init(ap_queues);