From owner-dev-commits-src-all@freebsd.org Sat Sep 4 20:13:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC94366B4A0; Sat, 4 Sep 2021 20:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H25Sg5WSjz4f0m; Sat, 4 Sep 2021 20:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4890B1E23A; Sat, 4 Sep 2021 20:13:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 184KD7Zo068680; Sat, 4 Sep 2021 20:13:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 184KD7dY068679; Sat, 4 Sep 2021 20:13:07 GMT (envelope-from git) Date: Sat, 4 Sep 2021 20:13:07 GMT Message-Id: <202109042013.184KD7dY068679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 541699f6f69c - main - Remove impossible checks. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 541699f6f69c2ba196386c31107b0159457013c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2021 20:13:08 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=541699f6f69c2ba196386c31107b0159457013c2 commit 541699f6f69c2ba196386c31107b0159457013c2 Author: Alexander Motin AuthorDate: 2021-09-04 20:10:50 +0000 Commit: Alexander Motin CommitDate: 2021-09-04 20:10:50 +0000 Remove impossible checks. --- sys/dev/sound/pci/maestro.c | 8 +------- 1 file changed, 1 insertion(+), 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); }