Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/compat/ossaudio Pull up revision 1.43 (requested by...



details:   https://anonhg.NetBSD.org/src/rev/5a9725ee87aa
branches:  netbsd-1-6
changeset: 530585:5a9725ee87aa
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Aug 17 11:17:14 2003 +0000

description:
Pull up revision 1.43 (requested by tv in ticket #1422):
Fix missing call to FILE_UNUSE.  From kern/21946, from Todd Vierling.

diffstat:

 sys/compat/ossaudio/ossaudio.c |  21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diffs (58 lines):

diff -r 827a78b117f8 -r 5a9725ee87aa sys/compat/ossaudio/ossaudio.c
--- a/sys/compat/ossaudio/ossaudio.c    Sun Aug 17 11:15:53 2003 +0000
+++ b/sys/compat/ossaudio/ossaudio.c    Sun Aug 17 11:17:14 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ossaudio.c,v 1.39 2001/12/24 00:10:49 mycroft Exp $    */
+/*     $NetBSD: ossaudio.c,v 1.39.10.1 2003/08/17 11:17:14 tron Exp $  */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.39 2001/12/24 00:10:49 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.39.10.1 2003/08/17 11:17:14 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -762,11 +762,12 @@
        case OSS_SOUND_OLD_MIXER_INFO:
                error = ioctlf(fp, AUDIO_GETDEV, (caddr_t)&adev, p);
                if (error)
-                       return (error);
+                       goto out;
                omi.modify_counter = 1;
                strncpy(omi.id, adev.name, sizeof omi.id);
                strncpy(omi.name, adev.name, sizeof omi.name);
-               return copyout(&omi, SCARG(uap, data), OSS_IOCTL_SIZE(com));
+               error = copyout(&omi, SCARG(uap, data), OSS_IOCTL_SIZE(com));
+               goto out;
        case OSS_SOUND_MIXER_READ_RECSRC:
                if (di->source == -1) {
                        error = EINVAL;
@@ -819,16 +820,20 @@
                                if (idat & (1 << i))
                                        break;
                        if (i >= OSS_SOUND_MIXER_NRDEVICES ||
-                           di->devmap[i] == -1)
-                               return EINVAL;
+                           di->devmap[i] == -1) {
+                               error = EINVAL;
+                               goto out;
+                       }
                        mc.un.ord = enum_to_ord(di, di->devmap[i]);
                } else {
                        mc.type = AUDIO_MIXER_SET;
                        mc.un.mask = 0;
                        for(i = 0; i < OSS_SOUND_MIXER_NRDEVICES; i++) {
                                if (idat & (1 << i)) {
-                                       if (di->devmap[i] == -1)
-                                               return EINVAL;
+                                       if (di->devmap[i] == -1) {
+                                               error = EINVAL;
+                                               goto out;
+                                       }
                                        mc.un.mask |= enum_to_mask(di, di->devmap[i]);
                                }
                        }



Home | Main Index | Thread Index | Old Index