Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Fix return value. fo_mmap is expected to return err...



details:   https://anonhg.NetBSD.org/src/rev/6ba2f18552f3
branches:  trunk
changeset: 827232:6ba2f18552f3
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Oct 21 09:02:23 2017 +0000

description:
Fix return value.  fo_mmap is expected to return errno on error.

diffstat:

 sys/dev/audio.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e19798e1b6dc -r 6ba2f18552f3 sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Oct 21 08:27:19 2017 +0000
+++ b/sys/dev/audio.c   Sat Oct 21 09:02:23 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.410 2017/10/01 21:49:20 nat Exp $  */
+/*     $NetBSD: audio.c,v 1.411 2017/10/21 09:02:23 isaki Exp $        */
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.410 2017/10/01 21:49:20 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.411 2017/10/21 09:02:23 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1952,7 +1952,7 @@
        error = 0;
 
        if ((error = audio_enter(dev, RW_READER, &sc)) != 0)
-               return 1;
+               return error;
        device_active(sc->dev, DVA_SYSTEM); /* XXXJDM */
 
        switch (AUDIODEV(dev)) {



Home | Main Index | Thread Index | Old Index