aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/config
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2024-10-25 11:36:51 +0000
committerChristos Margiolis <christos@FreeBSD.org>2024-10-25 11:36:51 +0000
commit43c0b593c2c3b2c07009c031a0e7e8190a45b31a (patch)
tree2698a1b9909ade64fb27ad17e6488a6c3c060652 /usr.sbin/config
parent3df1abdfd9c309efbdc7884d6b6f6fe25efcb397 (diff)
downloadsrc-43c0b593c2c3b2c07009c031a0e7e8190a45b31a.tar.gz
src-43c0b593c2c3b2c07009c031a0e7e8190a45b31a.zip
sound: Remove redundant refcount checks in vchan_setnew()
When adding a new vchan, we are looking for a parent channel which either already has vchans (i.e CHN_F_HAS_VCHAN), or does not, but is also not being used (i.e !CHN_F_BUSY). Since CHN_F_BUSY essentially tells us if the channel is currently being used or not, there is no need to check if the channel's refcount is 0 as well. When removing a vchan, we first check if we have only 1 vchan allocated that is also being used (so we cannot remove it at the moment), and then we check if the vchan is not busy and remove it. Again, checking CHN_F_BUSY is enough. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D47268
Diffstat (limited to 'usr.sbin/config')
0 files changed, 0 insertions, 0 deletions