Module Name: src
Committed By: riastradh
Date: Tue Jun 1 21:27:36 UTC 2021
Modified Files:
src/sys/dev/audio: audio.c
Log Message:
audio(4): audio_unlink never fails, so make it return void.
To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/audio/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/audio.c
diff -u src/sys/dev/audio/audio.c:1.101 src/sys/dev/audio/audio.c:1.102
--- src/sys/dev/audio/audio.c:1.101 Tue Jun 1 21:19:03 2021
+++ src/sys/dev/audio/audio.c Tue Jun 1 21:27:36 2021
@@ -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 filt_audioread_event(struct
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 @@ audio_close(struct audio_softc *sc, audi
/* 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 @@ audio_unlink(struct audio_softc *sc, aud
kauth_cred_free(cred);
TRACE(3, "done");
-
- return 0;
}
/*