Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132606
b: refs/heads/master
c: 8920d5a
h: refs/heads/master
v: v3
  • Loading branch information
Rajiv Andrade authored and James Morris committed Feb 5, 2009
1 parent 7d3ec38 commit 4be66b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 64c61d80a6e4c935a09ac5ff1d952967ca1268f8
refs/heads/master: 8920d5ad6ba74ae8ab020e90cc4d976980e68701
8 changes: 5 additions & 3 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,18 +666,20 @@ EXPORT_SYMBOL_GPL(tpm_show_temp_deactivated);
*/
static struct tpm_chip *tpm_chip_find_get(int chip_num)
{
struct tpm_chip *pos;
struct tpm_chip *pos, *chip = NULL;

rcu_read_lock();
list_for_each_entry_rcu(pos, &tpm_chip_list, list) {
if (chip_num != TPM_ANY_NUM && chip_num != pos->dev_num)
continue;

if (try_module_get(pos->dev->driver->owner))
if (try_module_get(pos->dev->driver->owner)) {
chip = pos;
break;
}
}
rcu_read_unlock();
return pos;
return chip;
}

#define TPM_ORDINAL_PCRREAD cpu_to_be32(21)
Expand Down

0 comments on commit 4be66b1

Please sign in to comment.