diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2014-06-19 15:00:19 -0400 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2014-07-29 23:10:55 +0200 |
commit | b49e1043c48dac23f64fba684d31c4a96c1ffaa0 (patch) | |
tree | 6b6e91287796c992300d6b328df1b29084b27896 /drivers/char | |
parent | f07a5e9a331045e976a3d317ba43d14859d9407c (diff) | |
download | linux-b49e1043c48dac23f64fba684d31c4a96c1ffaa0.tar.bz2 |
tpm: Properly clean sysfs entries in error path
Properly clean the sysfs entries in the error path
Cc: <stable@vger.kernel.org>
Reported-by: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm-interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index 62e10fd1e1cb..d175fb8e719a 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -1095,7 +1095,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, goto del_misc; if (tpm_add_ppi(&dev->kobj)) - goto del_misc; + goto del_sysfs; chip->bios_dir = tpm_bios_log_setup(chip->devname); @@ -1106,6 +1106,8 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, return chip; +del_sysfs: + tpm_sysfs_del_device(chip); del_misc: tpm_dev_del_device(chip); put_device: |