diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-23 21:23:53 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-23 21:23:53 +0000 |
commit | dd6c7d76b32b3023e279042674f165815c7e2f3e (patch) | |
tree | d5070d621a7a7afb9a2be74b694f0ea2a8e40ae9 /sys/arch | |
parent | 68957afbe436d13477bdc78daf5e390a240eeacf (diff) |
Do not set kl_hub_widget[] default value more than once. Found the hard way
by deraadt@.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sgi/sgi/sginode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/sgi/sgi/sginode.c b/sys/arch/sgi/sgi/sginode.c index 95bfbb9058a..d0d849b47fb 100644 --- a/sys/arch/sgi/sgi/sginode.c +++ b/sys/arch/sgi/sgi/sginode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sginode.c,v 1.27 2011/04/23 19:52:36 miod Exp $ */ +/* $OpenBSD: sginode.c,v 1.28 2011/04/23 21:23:52 miod Exp $ */ /* * Copyright (c) 2008, 2009, 2011 Miodrag Vallat. * @@ -156,7 +156,8 @@ kl_first_pass_board(lboard_t *boardinfo, void *arg) * interrupt widget is hardwired to #a (which is another facet * of the bridge). */ - kl_hub_widget[boardinfo->brd_nasid] = 0x0a; + if (kl_hub_widget[boardinfo->brd_nasid] == 0) + kl_hub_widget[boardinfo->brd_nasid] = 0x0a; kl_scan_board(boardinfo, KLSTRUCT_ANY, kl_first_pass_comp, arg); |