diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-01-11 21:58:06 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-01-11 21:58:06 +0000 |
commit | 53219792afd8a52ba75fe306e99a3f848bc62cdf (patch) | |
tree | 656fc06ee4b46aa4cb22e9ddecfde21db9005e35 /sys/dev/pci/sti_pci.c | |
parent | cd8a72824ca6117eb03f1f980ac722941bc83b86 (diff) |
Allow sti_attach_common() to return an error code, and do not fall into
sti_end_attach() if an error has occured.
ok mickey@
Diffstat (limited to 'sys/dev/pci/sti_pci.c')
-rw-r--r-- | sys/dev/pci/sti_pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/sti_pci.c b/sys/dev/pci/sti_pci.c index 29a00b30f5a..6c86b9e57b4 100644 --- a/sys/dev/pci/sti_pci.c +++ b/sys/dev/pci/sti_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sti_pci.c,v 1.1 2006/12/18 18:59:25 miod Exp $ */ +/* $OpenBSD: sti_pci.c,v 1.2 2007/01/11 21:58:05 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -66,9 +66,9 @@ sti_pci_attach(struct device *parent, struct device *self, void *aux) return; printf("%s", self->dv_xname); - sti_attach_common(sc, STI_CODEBASE_MAIN); - - sti_end_attach(sc); + if (sti_attach_common(&spc->sc_base, STI_CODEBASE_MAIN) == 0) { + startuphook_establish(sti_end_attach, spc); + } } /* |