Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233140
b: refs/heads/master
c: 24a6f5b
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Strakh authored and Linus Torvalds committed Feb 12, 2011
1 parent ba7a381 commit 60b8ddb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 6e20fb18054c179d7e64c0af43d855b9310a3394
refs/heads/master: 24a6f5b8589d2abfbf523c59ab1258726edc164f
6 changes: 5 additions & 1 deletion trunk/drivers/rtc/rtc-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,16 @@ static int rtc_proc_show(struct seq_file *seq, void *offset)

static int rtc_proc_open(struct inode *inode, struct file *file)
{
int ret;
struct rtc_device *rtc = PDE(inode)->data;

if (!try_module_get(THIS_MODULE))
return -ENODEV;

return single_open(file, rtc_proc_show, rtc);
ret = single_open(file, rtc_proc_show, rtc);
if (ret)
module_put(THIS_MODULE);
return ret;
}

static int rtc_proc_release(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 60b8ddb

Please sign in to comment.