Re: [PATCH] tpm: use devm_add_action_or_reset

From: Jason Gunthorpe
Date: Mon Apr 25 2016 - 16:57:30 EST


On Mon, Apr 25, 2016 at 09:46:38PM +0100, Sudip Mukherjee wrote:
> If devm_add_action() fails we are explicitly calling the cleanup function
> in the error path. Lets use the helper function devm_add_action_or_reset()
> and return directly as we know the cleanup has been done by the helper.

Seems reasonable to me.

Reviewed-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>