diff options
author | James Morris <james.l.morris@oracle.com> | 2014-09-30 16:44:04 +0200 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-09-30 16:44:04 +0200 |
commit | 6c8ff877cdf13cd5287ed9d700cfb6cb70e2bfa1 (patch) | |
tree | 2ab49b7d19fb69cdae5b6be9e7ba44f6cf3d45ef /drivers/s390/crypto | |
parent | Merge tag 'keys-next-20140922' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
parent | Linux 3.16 (diff) | |
download | linux-6c8ff877cdf13cd5287ed9d700cfb6cb70e2bfa1.tar.xz linux-6c8ff877cdf13cd5287ed9d700cfb6cb70e2bfa1.zip |
Merge commit 'v3.16' into next
Diffstat (limited to 'drivers/s390/crypto')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 69ef4f8cfac8..4038437ff033 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -901,10 +901,15 @@ static int ap_device_probe(struct device *dev) int rc; ap_dev->drv = ap_drv; + + spin_lock_bh(&ap_device_list_lock); + list_add(&ap_dev->list, &ap_device_list); + spin_unlock_bh(&ap_device_list_lock); + rc = ap_drv->probe ? ap_drv->probe(ap_dev) : -ENODEV; - if (!rc) { + if (rc) { spin_lock_bh(&ap_device_list_lock); - list_add(&ap_dev->list, &ap_device_list); + list_del_init(&ap_dev->list); spin_unlock_bh(&ap_device_list_lock); } return rc; |