summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/macio-adb.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-03-29 05:34:46 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-04-07 18:00:44 +1000
commit86e4754ac8fde9a9c913571016bc31257aa2e195 (patch)
treec96a3df8769e488a6a03e40c330e9cacc872045a /drivers/macintosh/macio-adb.c
parentf6d8c8bb1d360272d795927d39f3d2c5934e77d9 (diff)
downloadtalos-obmc-linux-86e4754ac8fde9a9c913571016bc31257aa2e195.tar.gz
talos-obmc-linux-86e4754ac8fde9a9c913571016bc31257aa2e195.zip
powerpc/pmac: Add missing unlocks in error path
In some error handling cases the lock is not unlocked. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E1; identifier f; @@ f (...) { <+... * spin_lock_irqsave (E1,...); ... when != E1 * return ...; ...+> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh/macio-adb.c')
-rw-r--r--drivers/macintosh/macio-adb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
index 79119f56e82d..bd6da7a9c55b 100644
--- a/drivers/macintosh/macio-adb.c
+++ b/drivers/macintosh/macio-adb.c
@@ -155,6 +155,7 @@ static int macio_adb_reset_bus(void)
while ((in_8(&adb->ctrl.r) & ADB_RST) != 0) {
if (--timeout == 0) {
out_8(&adb->ctrl.r, in_8(&adb->ctrl.r) & ~ADB_RST);
+ spin_unlock_irqrestore(&macio_lock, flags);
return -1;
}
}
OpenPOWER on IntegriCloud