Skip to content

Commit cf2d007

Browse files
Holger DenglerMartin Schwidefsky
authored andcommitted
[S390] ap: skip device registration on type probe failure
The registration of an ap device will be skipped, if the device type probing fails. Add names of current crypto adapters to the Kconfig help. Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 89db4df commit cf2d007

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎drivers/crypto/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ config ZCRYPT
7474
+ PCI-X Cryptographic Coprocessor (PCIXCC)
7575
+ Crypto Express2 Coprocessor (CEX2C)
7676
+ Crypto Express2 Accelerator (CEX2A)
77+
+ Crypto Express3 Coprocessor (CEX3C)
78+
+ Crypto Express3 Accelerator (CEX3A)
7779

7880
config ZCRYPT_MONOLITHIC
7981
bool "Monolithic zcrypt module"

‎drivers/s390/crypto/ap_bus.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,8 +1183,12 @@ static void ap_scan_bus(struct work_struct *unused)
11831183
INIT_LIST_HEAD(&ap_dev->list);
11841184
setup_timer(&ap_dev->timeout, ap_request_timeout,
11851185
(unsigned long) ap_dev);
1186-
if (device_type == 0)
1187-
ap_probe_device_type(ap_dev);
1186+
if (device_type == 0) {
1187+
if (ap_probe_device_type(ap_dev)) {
1188+
kfree(ap_dev);
1189+
continue;
1190+
}
1191+
}
11881192
else
11891193
ap_dev->device_type = device_type;
11901194

0 commit comments

Comments
 (0)