Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177306141
D59109.1794117228.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
797 B
Referenced Files
None
Subscribers
None
D59109.1794117228.diff
View Options
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -698,22 +698,16 @@
struct snd_mixer *m;
m = oidp->oid_arg1;
- mtx_lock(m->lock);
strlcpy(devname, snd_mixernames[m->hwvol_mixer], sizeof(devname));
- mtx_unlock(m->lock);
error = sysctl_handle_string(oidp, &devname[0], sizeof(devname), req);
- mtx_lock(m->lock);
if (error == 0 && req->newptr != NULL) {
- dev = mixer_lookup(devname);
- if (dev == -1) {
- mtx_unlock(m->lock);
- return EINVAL;
- } else {
- m->hwvol_mixer = dev;
- }
+ if ((dev = mixer_lookup(devname)) == -1)
+ return (EINVAL);
+ mtx_lock(m->lock);
+ m->hwvol_mixer = dev;
+ mtx_unlock(m->lock);
}
- mtx_unlock(m->lock);
- return error;
+ return (error);
}
int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 8, 5:53 AM (3 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37141606
Default Alt Text
D59109.1794117228.diff (797 B)
Attached To
Mode
D59109: sound: Remove unncessary locking in sysctl_hw_snd_hwvol_mixer()
Attached
Detach File
Event Timeline