TPM: fix memleak when register hardware fails
authorWanlong Gao <gaowanlong@cn.fujitsu.com>
Wed, 16 May 2012 08:24:28 +0000 (16:24 +0800)
committerRajiv Andrade <srajiv@linux.vnet.ibm.com>
Tue, 12 Jun 2012 21:53:50 +0000 (18:53 -0300)
commitdad79cb89254ce646906846b0f0cf7995d626710
tree7be53c9e63a8adf4d4655ae655dbc6466e58d72a
parent24ebe6670de3d1f0dca11c9eb372134c7ab05503
TPM: fix memleak when register hardware fails

Adding proper kfree() before returning.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
drivers/char/tpm/tpm.c