From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262043AbVDRLuh (ORCPT ); Mon, 18 Apr 2005 07:50:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262046AbVDRLuh (ORCPT ); Mon, 18 Apr 2005 07:50:37 -0400 Received: from arnor.apana.org.au ([203.14.152.115]:19462 "EHLO arnor.apana.org.au") by vger.kernel.org with ESMTP id S262043AbVDRLub (ORCPT ); Mon, 18 Apr 2005 07:50:31 -0400 Date: Mon, 18 Apr 2005 21:49:25 +1000 To: Jesper Juhl Cc: "David S. Miller" , James Morris , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: resource release functions ought to check for NULL (crypto_free_tfm) Message-ID: <20050418114925.GA6854@gondor.apana.org.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i From: Herbert Xu Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 15, 2005 at 01:15:58AM +0200, Jesper Juhl wrote: > > As far as I'm aware there's a general concensus that functions that are > responsible for freeing resources should be able to cope with being passed > a NULL pointer. This makes sense as it removes the need for all callers to In general I'd only do this when most of the callers are doing the NULL check. As that seems to be the case here, I agree with your change. I've applied it to my tree. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt