From 316cb543988ff261c67b8e6ad64441febcd65735 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Tue, 27 Apr 2010 14:11:03 -0700 Subject: [PATCH] --- yaml --- r: 190574 b: refs/heads/master c: 8c88e50bcf7f9f7e1b4987aaac3dfacc3ac6bd24 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/gpu/vga/vga_switcheroo.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index ee0ebe216479..35ecdced5b73 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 404b017d00a9f472bdf725a06892d42f1cba5ed8 +refs/heads/master: 8c88e50bcf7f9f7e1b4987aaac3dfacc3ac6bd24 diff --git a/trunk/drivers/gpu/vga/vga_switcheroo.c b/trunk/drivers/gpu/vga/vga_switcheroo.c index d6d1149d525d..c8768f38511e 100644 --- a/trunk/drivers/gpu/vga/vga_switcheroo.c +++ b/trunk/drivers/gpu/vga/vga_switcheroo.c @@ -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) {