diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-03-20 22:40:19 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-03-20 22:40:19 +0000 |
commit | 85a0ab54e4aa2331927856b3707089ed33e95544 (patch) | |
tree | 5dac169d3247dd4b7a3e4e836af9d3226191a4aa | |
parent | e90c15add55da0960507e2dc56f61b16e6875992 (diff) |
Don't forget to unlock of reading the RTC fails.
Should fix panic on iMac G5 (iSight).
-rw-r--r-- | sys/arch/macppc/dev/smu.c | 4 |
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); } |