Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313606
b: refs/heads/master
c: dad79cb
h: refs/heads/master
v: v3
  • Loading branch information
Wanlong Gao authored and Rajiv Andrade committed Jun 12, 2012
1 parent 20e8783 commit 2b3bbf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 24ebe6670de3d1f0dca11c9eb372134c7ab05503
refs/heads/master: dad79cb89254ce646906846b0f0cf7995d626710
9 changes: 4 additions & 5 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,15 +1413,12 @@ struct tpm_chip *tpm_register_hardware(struct device *dev,
"unable to misc_register %s, minor %d\n",
chip->vendor.miscdev.name,
chip->vendor.miscdev.minor);
put_device(chip->dev);
return NULL;
goto put_device;
}

if (sysfs_create_group(&dev->kobj, chip->vendor.attr_group)) {
misc_deregister(&chip->vendor.miscdev);
put_device(chip->dev);

return NULL;
goto put_device;
}

chip->bios_dir = tpm_bios_log_setup(devname);
Expand All @@ -1433,6 +1430,8 @@ struct tpm_chip *tpm_register_hardware(struct device *dev,

return chip;

put_device:
put_device(chip->dev);
out_free:
kfree(chip);
kfree(devname);
Expand Down

0 comments on commit 2b3bbf3

Please sign in to comment.