HomeFreeBSD

sound: Simplify chn_init()

Description

sound: Simplify chn_init()

  • Remove unnecessary CHN_[UN]LOCKs.
  • Improve device_printf() messages.
  • Remove redundant checks.
  • Remove 0 assignments, since the channel is allocated with M_ZERO.
  • Re-organize sections in a more coherent way.
  • Remove "out1" label, just return NULL directly.
  • Rename "out2" to "fail" and simplify logic.
  • Do not check the return value of dsp_unit2name(), as it is guaranteed not to fail (we pass a valid channel type).

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45985

Details

Provenance
christosAuthored on Jul 27 2024, 11:55 AM
Reviewer
dev_submerge.ch
Differential Revision
D45985: sound: Simplify chn_init()
Parents
rGc55f995502cb: sound: Remove unused FEEDER_DEBUG
Branches
Unknown
Tags
Unknown