Module Name: src Committed By: isaki Date: Sat Oct 21 09:02:23 UTC 2017
Modified Files: src/sys/dev: audio.c Log Message: Fix return value. fo_mmap is expected to return errno on error. To generate a diff of this commit: cvs rdiff -u -r1.410 -r1.411 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.410 src/sys/dev/audio.c:1.411 --- src/sys/dev/audio.c:1.410 Sun Oct 1 21:49:20 2017 +++ src/sys/dev/audio.c Sat Oct 21 09:02:23 2017 @@ -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 <nathanialsl...@yahoo.com.au> @@ -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 @@ audio_fop_mmap(struct file *fp, off_t *o 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)) {