Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932098AbVJMTh0 (ORCPT ); Thu, 13 Oct 2005 15:37:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932162AbVJMTh0 (ORCPT ); Thu, 13 Oct 2005 15:37:26 -0400 Received: from ams-iport-1.cisco.com ([144.254.224.140]:62565 "EHLO ams-iport-1.cisco.com") by vger.kernel.org with ESMTP id S932098AbVJMThZ (ORCPT ); Thu, 13 Oct 2005 15:37:25 -0400 To: Jesper Juhl Cc: "linux-kernel" , Andrew Morton , Len Brown , iss_storagedev@hp.com, Jakub Jelinek , Frodo Looijaard , Jean Delvare , Bartlomiej Zolnierkiewicz , Jens Axboe , Sergio Rozanski Filho , Benjamin Herrenschmidt , Pierre Ossman , Carsten Gross , "Greg Kroah-Hartman" , David Hinds , Vinh Truong , Mark Douglas Corner , Michael Downey , Antonino Daplas , Ben Gardner Subject: Re: [PATCH 09/14] Big kfree NULL check cleanup - misc remaining drivers X-Message-Flag: Warning: May contain useful information References: <200510132128.45171.jesper.juhl@gmail.com> From: Roland Dreier Date: Thu, 13 Oct 2005 12:37:07 -0700 In-Reply-To: <200510132128.45171.jesper.juhl@gmail.com> (Jesper Juhl's message of "Thu, 13 Oct 2005 21:28:44 +0200") Message-ID: <52ek6p2opo.fsf@cisco.com> User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-OriginalArrivalTime: 13 Oct 2005 19:37:09.0439 (UTC) FILETIME=[804A5CF0:01C5D02D] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1072 Lines: 31 For what it's worth, the InfiniBand chunk below looks good to me. Acked-by: Roland Dreier --- linux-2.6.14-rc4-orig/drivers/infiniband/core/mad.c 2005-10-11 22:41:09.000000000 +0200 +++ linux-2.6.14-rc4/drivers/infiniband/core/mad.c 2005-10-12 17:37:50.000000000 +0200 @@ -510,8 +510,7 @@ static void unregister_mad_agent(struct wait_event(mad_agent_priv->wait, !atomic_read(&mad_agent_priv->refcount)); - if (mad_agent_priv->reg_req) - kfree(mad_agent_priv->reg_req); + kfree(mad_agent_priv->reg_req); ib_dereg_mr(mad_agent_priv->agent.mr); kfree(mad_agent_priv); } @@ -2544,8 +2543,7 @@ error: static void destroy_mad_qp(struct ib_mad_qp_info *qp_info) { ib_destroy_qp(qp_info->qp); - if (qp_info->snoop_table) - kfree(qp_info->snoop_table); + kfree(qp_info->snoop_table); } /* - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/