gpu: vga_switcheroo, fix lock imbalance
Stanse found that one error path in vga_switcheroo_debugfs_write omits to unlock vgasr_mutex. Fix that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
404b017d00
commit
8c88e50bcf
1 changed files with 4 additions and 2 deletions
|
@ -276,8 +276,10 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
|
||||||
|
|
||||||
mutex_lock(&vgasr_mutex);
|
mutex_lock(&vgasr_mutex);
|
||||||
|
|
||||||
if (!vgasr_priv.active)
|
if (!vgasr_priv.active) {
|
||||||
return -EINVAL;
|
cnt = -EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* pwr off the device not in use */
|
/* pwr off the device not in use */
|
||||||
if (strncmp(usercmd, "OFF", 3) == 0) {
|
if (strncmp(usercmd, "OFF", 3) == 0) {
|
||||||
|
|
Loading…
Reference in a new issue