Skip to content

Commit 020d5dc

Browse files
committed
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: cccd85b ("s390/zcrypt: Rework debug feature invocations.") Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent f25d952 commit 020d5dc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/s390/crypto/ap_bus.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,15 +2494,15 @@ static int __init ap_module_init(void)
24942494
{
24952495
int rc;
24962496

2497-
rc = ap_debug_init();
2498-
if (rc)
2499-
return rc;
2500-
25012497
if (!ap_instructions_available()) {
25022498
pr_warn("The hardware system does not support AP instructions\n");
25032499
return -ENODEV;
25042500
}
25052501

2502+
rc = ap_debug_init();
2503+
if (rc)
2504+
return rc;
2505+
25062506
/* init ap_queue hashtable */
25072507
hash_init(ap_queues);
25082508

0 commit comments

Comments
 (0)