summaryrefslogtreecommitdiff
path: root/sys/arch/macppc/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-03-20 22:40:19 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-03-20 22:40:19 +0000
commit85a0ab54e4aa2331927856b3707089ed33e95544 (patch)
tree5dac169d3247dd4b7a3e4e836af9d3226191a4aa /sys/arch/macppc/dev
parente90c15add55da0960507e2dc56f61b16e6875992 (diff)
Don't forget to unlock of reading the RTC fails.
Should fix panic on iMac G5 (iSight).
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r--sys/arch/macppc/dev/smu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/macppc/dev/smu.c b/sys/arch/macppc/dev/smu.c
index c0e510635a7..da9c5a39b98 100644
--- a/sys/arch/macppc/dev/smu.c
+++ b/sys/arch/macppc/dev/smu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smu.c,v 1.11 2006/01/19 17:08:39 grange Exp $ */
+/* $OpenBSD: smu.c,v 1.12 2006/03/20 22:40:18 kettenis Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -411,6 +411,8 @@ smu_time_read(time_t *secs)
cmd->data[0] = SMU_RTC_GET_DATETIME;
error = smu_do_cmd(sc, 800);
if (error) {
+ lockmgr(&sc->sc_lock, LK_RELEASE, NULL);
+
*secs = 0;
return (error);
}