Module Name:    src
Committed By:   cegger
Date:           Sun Apr 26 10:45:20 UTC 2009

Modified Files:
        src/sys/dev/pci: if_bwi_pci.c

Log Message:
check error code from bwi_attach()


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_bwi_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_bwi_pci.c
diff -u src/sys/dev/pci/if_bwi_pci.c:1.7 src/sys/dev/pci/if_bwi_pci.c:1.8
--- src/sys/dev/pci/if_bwi_pci.c:1.7	Sun Apr 26 10:26:54 2009
+++ src/sys/dev/pci/if_bwi_pci.c	Sun Apr 26 10:45:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bwi_pci.c,v 1.7 2009/04/26 10:26:54 cegger Exp $	*/
+/*	$NetBSD: if_bwi_pci.c,v 1.8 2009/04/26 10:45:19 cegger Exp $	*/
 /*	$OpenBSD: if_bwi_pci.c,v 1.6 2008/02/14 22:10:02 brad Exp $ */
 
 /*
@@ -25,7 +25,7 @@
 #include "bpfilter.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bwi_pci.c,v 1.7 2009/04/26 10:26:54 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bwi_pci.c,v 1.8 2009/04/26 10:45:19 cegger Exp $");
 
 #include <sys/param.h>
 #include <sys/callout.h>
@@ -111,6 +111,7 @@
 	const char *intrstr = NULL;
 	pci_intr_handle_t ih;
 	pcireg_t memtype, reg;
+	int error = 0;
 
 	aprint_naive("\n");
 	aprint_normal(": Broadcom Wireless");
@@ -171,7 +172,9 @@
 	if (!pmf_device_register(self, bwi_suspend, bwi_resume))
 		aprint_error_dev(self, "couldn't establish power handler\n");
 
-	bwi_attach(sc);
+	error = bwi_attach(sc);
+	if (error)
+		goto fail;
 	return;
 
 fail:

Reply via email to