The patch below does not apply to the 3.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From b49e1043c48dac23f64fba684d31c4a96c1ffaa0 Mon Sep 17 00:00:00 2001 From: Stefan Berger <[email protected]> Date: Thu, 19 Jun 2014 15:00:19 -0400 Subject: [PATCH] tpm: Properly clean sysfs entries in error path Properly clean the sysfs entries in the error path Cc: <[email protected]> Reported-by: Dmitry Kasatkin <[email protected]> Signed-off-by: Stefan Berger <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Peter Huewe <[email protected]> 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: -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
