Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100297
b: refs/heads/master
c: fc7f687
h: refs/heads/master
i:
  100295: 1250fcf
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 07595da commit 331b5bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 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: 5794e1b14bcd9817c5fa27d3254996f0d9551296
refs/heads/master: fc7f687a6878e19f7ce58cb8a65659cd2730b586
15 changes: 11 additions & 4 deletions trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,20 +1326,27 @@ fb_open(struct inode *inode, struct file *file)

if (fbidx >= FB_MAX)
return -ENODEV;
lock_kernel();
#ifdef CONFIG_KMOD
if (!(info = registered_fb[fbidx]))
try_to_load(fbidx);
#endif /* CONFIG_KMOD */
if (!(info = registered_fb[fbidx]))
return -ENODEV;
if (!try_module_get(info->fbops->owner))
return -ENODEV;
if (!(info = registered_fb[fbidx])) {
res = -ENODEV;
goto out;
}
if (!try_module_get(info->fbops->owner)) {
res = -ENODEV;
goto out;
}
file->private_data = info;
if (info->fbops->fb_open) {
res = info->fbops->fb_open(info,1);
if (res)
module_put(info->fbops->owner);
}
out:
unlock_kernel();
return res;
}

Expand Down

0 comments on commit 331b5bf

Please sign in to comment.