Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c88e50b authored by Jiri Slaby's avatar Jiri Slaby Committed by Dave Airlie
Browse files

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: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 404b017d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -276,8 +276,10 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,

	mutex_lock(&vgasr_mutex);

	if (!vgasr_priv.active)
		return -EINVAL;
	if (!vgasr_priv.active) {
		cnt = -EINVAL;
		goto out;
	}

	/* pwr off the device not in use */
	if (strncmp(usercmd, "OFF", 3) == 0) {