Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/sysmon If module_autoload() returns an error, just r...



details:   https://anonhg.NetBSD.org/src/rev/01a843933d47
branches:  trunk
changeset: 808110:01a843933d47
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue May 05 00:28:25 2015 +0000

description:
If module_autoload() returns an error, just return that value instead
of overwriting with ENODEV.

Thanks, christos!

diffstat:

 sys/dev/sysmon/sysmon.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 96eab85d94b4 -r 01a843933d47 sys/dev/sysmon/sysmon.c
--- a/sys/dev/sysmon/sysmon.c   Tue May 05 00:25:44 2015 +0000
+++ b/sys/dev/sysmon/sysmon.c   Tue May 05 00:28:25 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysmon.c,v 1.26 2015/05/04 23:50:36 pgoyette Exp $     */
+/*     $NetBSD: sysmon.c,v 1.27 2015/05/05 00:28:25 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2000 Zembu Labs, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.26 2015/05/04 23:50:36 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.27 2015/05/05 00:28:25 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -153,6 +153,8 @@
                        error = module_autoload(sysmon_mod[minor(dev)],
                                                MODULE_CLASS_MISC);
                        mutex_enter(&sysmon_minor_mtx);
+                       if (error)
+                               break;
                        if (sysmon_opvec_table[minor(dev)] == NULL) {
                                error = ENODEV;
                                break;



Home | Main Index | Thread Index | Old Index