In article <[email protected]>,
Paul Goyette <[email protected]> wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  pgoyette
>Date:          Tue May  5 00:28:25 UTC 2015
>
>Modified Files:
>       src/sys/dev/sysmon: sysmon.c
>
>Log Message:
>If module_autoload() returns an error, just return that value instead
>of overwriting with ENODEV.
>
>Thanks, christos!

Yes, but break before the mutex_enter...

christos

>
>
>To generate a diff of this commit:
>cvs rdiff -u -r1.26 -r1.27 src/sys/dev/sysmon/sysmon.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/sysmon/sysmon.c
>diff -u src/sys/dev/sysmon/sysmon.c:1.26 src/sys/dev/sysmon/sysmon.c:1.27
>--- src/sys/dev/sysmon/sysmon.c:1.26   Mon May  4 23:50:36 2015
>+++ src/sys/dev/sysmon/sysmon.c        Tue May  5 00:28:25 2015
>@@ -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 @@ sysmonopen(dev_t dev, int flag, int mode
>                       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;
>
>
>-=-=-=-=-=-



Reply via email to