Module Name: src Committed By: martin Date: Wed May 26 09:42:42 UTC 2010
Modified Files: src/sys/dev/pci: pci_subr.c Log Message: Do not try to unload the pciverbose module if it had never been loaded. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/dev/pci/pci_subr.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/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.81 src/sys/dev/pci/pci_subr.c:1.82 --- src/sys/dev/pci/pci_subr.c:1.81 Tue May 25 08:35:45 2010 +++ src/sys/dev/pci/pci_subr.c Wed May 26 09:42:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.81 2010/05/25 08:35:45 pgoyette Exp $ */ +/* $NetBSD: pci_subr.c,v 1.82 2010/05/26 09:42:42 martin Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.81 2010/05/25 08:35:45 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.82 2010/05/26 09:42:42 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -328,10 +328,13 @@ if (load) { if (loaded++ == 0) - module_load("pciverbose", MODCTL_LOAD_FORCE, NULL, - MODULE_CLASS_MISC); + if (module_load("pciverbose", MODCTL_LOAD_FORCE, NULL, + MODULE_CLASS_MISC) !=0 ) + loaded = 0; return; } + if (loaded == 0) + return; if (--loaded == 0) module_unload("pciverbose"); }