You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2018/11/29 21:08:37 UTC
[mynewt-core] 07/14: hw/bus: Add missing unlock when configuration
failed
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 9fa8934774ded764c5f94c4527d0a3b9820a55f6
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Mon Nov 26 12:18:05 2018 +0100
hw/bus: Add missing unlock when configuration failed
---
hw/bus/src/bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/bus/src/bus.c b/hw/bus/src/bus.c
index 89e2882..c555f17 100644
--- a/hw/bus/src/bus.c
+++ b/hw/bus/src/bus.c
@@ -260,6 +260,7 @@ bus_node_lock(struct os_dev *node, os_time_t timeout)
rc = bdev->dops->configure(bdev, bnode);
if (rc) {
bdev->configured_for = NULL;
+ (void)bus_node_unlock(node);
} else {
bdev->configured_for = bnode;
}