From 53219792afd8a52ba75fe306e99a3f848bc62cdf Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 11 Jan 2007 21:58:06 +0000 Subject: Allow sti_attach_common() to return an error code, and do not fall into sti_end_attach() if an error has occured. ok mickey@ --- sys/dev/pci/sti_pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/pci/sti_pci.c') 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); + } } /* -- cgit v1.2.3