aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/crypto/ap_bus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-28 11:38:39 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-28 11:38:39 -0700
commit2da6dc28867b6cad6181291ed03093a487587d61 (patch)
treeb69255137267b8ac217705d2c19eb30ff2cdfc0d /drivers/s390/crypto/ap_bus.c
parent0c6cb974636dd29681b03f8eb0ae227decab01fb (diff)
parent3c9da7ba049d11caccc219576a3a23404aa2fc50 (diff)
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] cio: Make ccw_device_register() static. [S390] Improve AP bus device removal. [S390] uaccess error handling. [S390] cio: css_probe_device() must be called enabled. [S390] Initialize interval value to 0. [S390] sys_getcpu compat wrapper.
Diffstat (limited to 'drivers/s390/crypto/ap_bus.c')
-rw-r--r--drivers/s390/crypto/ap_bus.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index c5ccd20b110..79d89c36891 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -739,11 +739,16 @@ static void ap_scan_bus(void *data)
dev = bus_find_device(&ap_bus_type, NULL,
(void *)(unsigned long)qid,
__ap_scan_bus);
+ rc = ap_query_queue(qid, &queue_depth, &device_type);
+ if (dev && rc) {
+ put_device(dev);
+ device_unregister(dev);
+ continue;
+ }
if (dev) {
put_device(dev);
continue;
}
- rc = ap_query_queue(qid, &queue_depth, &device_type);
if (rc)
continue;
rc = ap_init_queue(qid);