Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169781617
D59109.id184737.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
797 B
Referenced Files
None
Subscribers
None
D59109.id184737.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
Thu, Sep 3, 1:29 PM (8 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37141606
Default Alt Text
D59109.id184737.diff (797 B)
Attached To
Mode
D59109: sound: Remove unncessary locking in sysctl_hw_snd_hwvol_mixer()
Attached
Detach File
Event Timeline
Log In to Comment