Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275909
b: refs/heads/master
c: c916874
h: refs/heads/master
i:
  275907: 42cd777
v: v3
  • Loading branch information
Julia Lawall authored and Dave Airlie committed Nov 22, 2011
1 parent 1d6a807 commit 862c453
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21240f9bc1b0ac925cd18b74618327a110022332
refs/heads/master: c916874d60d9daf2e2d5f4f622b185ef57deb6a4
18 changes: 12 additions & 6 deletions trunk/drivers/gpu/vga/vgaarb.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,14 +991,20 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
uc = &priv->cards[i];
}

if (!uc)
return -EINVAL;
if (!uc) {
ret_val = -EINVAL;
goto done;
}

if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0)
return -EINVAL;
if (io_state & VGA_RSRC_LEGACY_IO && uc->io_cnt == 0) {
ret_val = -EINVAL;
goto done;
}

if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0)
return -EINVAL;
if (io_state & VGA_RSRC_LEGACY_MEM && uc->mem_cnt == 0) {
ret_val = -EINVAL;
goto done;
}

vga_put(pdev, io_state);

Expand Down

0 comments on commit 862c453

Please sign in to comment.