summaryrefslogtreecommitdiffstats
path: root/sys/dev/ral
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-09-29 11:52:44 +0000
committerjhb <jhb@FreeBSD.org>2010-09-29 11:52:44 +0000
commitd9c87b0853c67c042a8a1d6b29c69542823e701f (patch)
tree756d0e910e2f6d40b39d931c0a730405587fbe7d /sys/dev/ral
parentdb4f2cdbdf7cdfd76c1872b095b0ef44d8f2b76d (diff)
downloadFreeBSD-src-d9c87b0853c67c042a8a1d6b29c69542823e701f.zip
FreeBSD-src-d9c87b0853c67c042a8a1d6b29c69542823e701f.tar.gz
If rt2560_bbp_init() fails, don't drop the lock as the callers of
rt2560_init_locked() expect the lock to be held on return. Reported by: Anton Shterenlikht mexas of bristol ac uk MFC after: 1 week
Diffstat (limited to 'sys/dev/ral')
-rw-r--r--sys/dev/ral/rt2560.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index 097771f..cdf7bad 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -2667,8 +2667,7 @@ rt2560_init_locked(struct rt2560_softc *sc)
RAL_WRITE(sc, RT2560_CSR1, RT2560_HOST_READY);
if (rt2560_bbp_init(sc) != 0) {
- rt2560_stop(sc);
- RAL_UNLOCK(sc);
+ rt2560_stop_locked(sc);
return;
}
OpenPOWER on IntegriCloud