Re: [PATCH 1/4] tpm: in case of error properly cleanup in tpmm_chip_alloc

2021-01-17 Thread Jarkko Sakkinen
On Sat, Jan 16, 2021 at 02:22:38AM +0100, Lino Sanfilippo wrote: > From: Lino Sanfilippo > > In tpmm_chip_alloc() a resource management action handler is installed to > release the chip->dev in case of error. This will result in the chip being > freed if it was the last reference. If the installa

[PATCH 1/4] tpm: in case of error properly cleanup in tpmm_chip_alloc

2021-01-15 Thread Lino Sanfilippo
From: Lino Sanfilippo In tpmm_chip_alloc() a resource management action handler is installed to release the chip->dev in case of error. This will result in the chip being freed if it was the last reference. If the installation of the handler was not successful an error is returned to the caller.