aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2021-09-04 20:10:50 +0000
committerAlexander Motin <mav@FreeBSD.org>2021-09-04 20:10:50 +0000
commit541699f6f69c2ba196386c31107b0159457013c2 (patch)
treea1d0e97f592363d75e9328559f1caa320ee2ee73
parent71bf3900b7827643830dfd9aa1db81bc2926eadb (diff)
downloadsrc-541699f6f69c2ba196386c31107b0159457013c2.tar.gz
src-541699f6f69c2ba196386c31107b0159457013c2.zip
Remove impossible checks.
-rw-r--r--sys/dev/sound/pci/maestro.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c
index 0d55e1227b9a..ed1c9ef1cad6 100644
--- a/sys/dev/sound/pci/maestro.c
+++ b/sys/dev/sound/pci/maestro.c
@@ -1776,11 +1776,6 @@ agg_attach(device_t dev)
mtx_init(&ess->lock, device_get_desc(dev), "snd_maestro softc",
MTX_DEF | MTX_RECURSE);
- if (!mtx_initialized(&ess->lock)) {
- device_printf(dev, "failed to create a mutex.\n");
- ret = ENOMEM;
- goto bad;
- }
if (resource_int_value(device_get_name(dev), device_get_unit(dev),
"dac", &dacn) == 0) {
@@ -1929,8 +1924,7 @@ agg_attach(device_t dev)
bus_dma_tag_destroy(ess->stat_dmat);
if (ess->buf_dmat != NULL)
bus_dma_tag_destroy(ess->buf_dmat);
- if (mtx_initialized(&ess->lock))
- mtx_destroy(&ess->lock);
+ mtx_destroy(&ess->lock);
free(ess, M_DEVBUF);
}