diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2025-10-24 13:24:33 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-01-11 17:21:16 +0300 |
| commit | bb04d3610f0803f7c2cb0b9a9ee38c02908ec3f2 (patch) | |
| tree | 91d4e3320335d7a66cc6ee51d131dd6466cb20fc | |
| parent | 772ded5a84e0a414e13203d6b28f65659b7cbe74 (diff) | |
| download | linux-bb04d3610f0803f7c2cb0b9a9ee38c02908ec3f2.tar.xz | |
s390/ap: Don't leak debug feature files if AP instructions are not available
[ Upstream commit 020d5dc57874e58d3ebae398f3fe258f029e3d06 ]
If no AP instructions are available the AP bus module leaks registered
debug feature files. Change function call order to fix this.
Fixes: cccd85bfb7bf ("s390/zcrypt: Rework debug feature invocations.")
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/s390/crypto/ap_bus.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 93351452184a..97cbf233a543 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -2235,15 +2235,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); |
