From d9c87b0853c67c042a8a1d6b29c69542823e701f Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 29 Sep 2010 11:52:44 +0000 Subject: [PATCH] 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 --- sys/dev/ral/rt2560.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c index 097771f46edc..cdf7badba8b0 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; }