提交 b49e1043 编写于 作者: S Stefan Berger 提交者: Peter Huewe

tpm: Properly clean sysfs entries in error path

Properly clean the sysfs entries in the error path

Cc: <stable@vger.kernel.org>
Reported-by: NDmitry Kasatkin <dmitry.kasatkin@gmail.com>
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: NPeter Huewe <peterhuewe@gmx.de>
上级 f07a5e9a
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册