On Wed, Sep 07, 2016 at 10:28:45PM +0000, Winkler, Tomas wrote:
> > 
> > On Wed, Sep 07, 2016 at 10:17:22PM +0000, Winkler, Tomas wrote:
> > 
> > > I think there is a memory leak in tpm_tis on the error path; maybe a
> > > missing call to dev_put, not sure I had just quick look.
> > 
> > tpmm_alloc uses devm, so the put happens in a devm cleanup.
> > 
> > Assuming everything still works the way it was intended :/
> 
> How this is triggered on the error path, if this didn't call yet to
> the device_add()

In the chip code 'pdev' is the device passed in to the driver's probe
function. devm_add_action is applied to the pdev, which is undone by
devm error unwind when the driver's probe fails.

Jason

------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to