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)
Wed, Sep 23, 4:53 PM
Unknown Object (File)
Sat, Sep 19, 9:26 AM
Unknown Object (File)
Thu, Sep 17, 3:38 PM
Unknown Object (File)
Wed, Sep 16, 6:17 AM
Unknown Object (File)
Mon, Sep 14, 12:26 AM
Unknown Object (File)
Sun, Sep 13, 4:15 PM
Unknown Object (File)
Sun, Sep 13, 3:15 PM
Unknown Object (File)
Sat, Sep 12, 11:47 PM
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