Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/audio audio(4): audio_unlink never fails, so make it...



details:   https://anonhg.NetBSD.org/src/rev/64599107b3cf
branches:  trunk
changeset: 1021500:64599107b3cf
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jun 01 21:27:36 2021 +0000

description:
audio(4): audio_unlink never fails, so make it return void.

diffstat:

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

diffs (57 lines):

diff -r 42e641b43a16 -r 64599107b3cf sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Tue Jun 01 21:19:03 2021 +0000
+++ b/sys/dev/audio/audio.c     Tue Jun 01 21:27:36 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.101 2021/06/01 21:19:03 riastradh Exp $    */
+/*     $NetBSD: audio.c,v 1.102 2021/06/01 21:27:36 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.101 2021/06/01 21:19:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.102 2021/06/01 21:27:36 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -545,7 +545,7 @@
 static int audio_open(dev_t, struct audio_softc *, int, int, struct lwp *,
        audio_file_t **);
 static int audio_close(struct audio_softc *, audio_file_t *);
-static int audio_unlink(struct audio_softc *, audio_file_t *);
+static void audio_unlink(struct audio_softc *, audio_file_t *);
 static int audio_read(struct audio_softc *, struct uio *, int, audio_file_t *);
 static int audio_write(struct audio_softc *, struct uio *, int, audio_file_t *);
 static void audio_file_clear(struct audio_softc *, audio_file_t *);
@@ -2581,17 +2581,17 @@
                /* XXX This should not happen but what should I do ? */
                panic("%s: can't acquire exlock: errno=%d", __func__, error);
        }
-       error = audio_unlink(sc, file);
+       audio_unlink(sc, file);
        audio_exlock_exit(sc);
 
-       return error;
+       return 0;
 }
 
 /*
  * Unlink this file, but not freeing memory here.
  * Must be called with sc_exlock held and without sc_lock held.
  */
-int
+static void
 audio_unlink(struct audio_softc *sc, audio_file_t *file)
 {
        kauth_cred_t cred = NULL;
@@ -2671,8 +2671,6 @@
                kauth_cred_free(cred);
 
        TRACE(3, "done");
-
-       return 0;
 }
 
 /*



Home | Main Index | Thread Index | Old Index