[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140915192543.577907406@linuxfoundation.org>
Date: Mon, 15 Sep 2014 12:24:22 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
Stefan Berger <stefanb@...ux.vnet.ibm.com>,
Jason Gunthorpe <jgunthorpe@...idianresearch.com>,
Peter Huewe <peterhuewe@....de>
Subject: [PATCH 3.16 023/158] tpm: Properly clean sysfs entries in error path
3.16-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Berger <stefanb@...ux.vnet.ibm.com>
commit b49e1043c48dac23f64fba684d31c4a96c1ffaa0 upstream.
Properly clean the sysfs entries in the error path
Reported-by: Dmitry Kasatkin <dmitry.kasatkin@...il.com>
Signed-off-by: Stefan Berger <stefanb@...ux.vnet.ibm.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Signed-off-by: Peter Huewe <peterhuewe@....de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/char/tpm/tpm-interface.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -1116,7 +1116,7 @@ struct tpm_chip *tpm_register_hardware(s
goto del_misc;
if (tpm_add_ppi(&dev->kobj))
- goto del_misc;
+ goto del_sysfs;
chip->bios_dir = tpm_bios_log_setup(chip->devname);
@@ -1127,6 +1127,8 @@ struct tpm_chip *tpm_register_hardware(s
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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists