From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH] tpm: use devm_add_action_or_reset Date: Mon, 27 Jun 2016 17:04:45 +0300 Message-ID: <20160627140445.GA1233@intel.com> References: <1465740329-4699-1-git-send-email-sudipm.mukherjee@gmail.com> <20160616202823.GE1414@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160616202823.GE1414-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Sudip Mukherjee Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Thu, Jun 16, 2016 at 10:28:23PM +0200, Jarkko Sakkinen wrote: > On Sun, Jun 12, 2016 at 03:05:29PM +0100, Sudip Mukherjee wrote: > > If devm_add_action() fails we are explicitly calling put_device() to > > free the resources allocated. Lets use the helper > > devm_add_action_or_reset() and return directly in case of error, as we > > know that the cleanup function has been already called by the helper if > > there was any error. > > > > Signed-off-by: Sudip Mukherjee > > Reviewed-by: Jarkko Sakkinen Applied to master. /Jarkko ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape