Page MenuHomeFreeBSD

sound: Remove unncessary locking in sysctl_hw_snd_hwvol_mixer()
ClosedPublic

Authored by christos on Aug 22 2026, 1:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 11, 8:05 AM
Unknown Object (File)
Fri, Oct 9, 7:29 PM
Unknown Object (File)
Tue, Oct 6, 1:05 AM
Unknown Object (File)
Mon, Oct 5, 8:52 PM
Unknown Object (File)
Mon, Oct 5, 1:19 AM
Unknown Object (File)
Sun, Oct 4, 2:34 PM
Unknown Object (File)
Sun, Oct 4, 2:34 PM
Unknown Object (File)
Sun, Oct 4, 1:45 AM
Subscribers

Details

Summary

The locking around strlcpy() was because of m->hwvol_mixer, but this is
just an int, so we don't need to lock in this case. Instead lock only
when m->hwvol_mixer is written.

While here, add parentheses around the returns.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable