Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933027AbbLVPip (ORCPT ); Tue, 22 Dec 2015 10:38:45 -0500 Received: from alln-iport-2.cisco.com ([173.37.142.89]:17896 "EHLO alln-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933006AbbLVPik (ORCPT ); Tue, 22 Dec 2015 10:38:40 -0500 X-Greylist: delayed 573 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Dec 2015 10:38:40 EST X-IronPort-AV: E=Sophos;i="5.20,464,1444694400"; d="scan'208";a="219262249" Date: Tue, 22 Dec 2015 10:29:03 -0500 From: Dave Goodell To: Julia Lawall Cc: Christian Benvenuti , kernel-janitors@vger.kernel.org, Doug Ledford , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Nelson Escobar Subject: Re: [PATCH] IB/usnic: delete unneeded IS_ERR test Message-ID: <20151222152903.GA23118@DGOODELL-M-F02A.cisco.com> References: <1450558139-466-1-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450558139-466-1-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated-User: dgoodell Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 726 Lines: 28 [copying Nelson too] On Sat, Dec 19, 2015 at 09:48:59PM +0100, Julia Lawall wrote: > kzalloc doesn't return ERR_PTR, so there is no need to test for it. > > The semantic match that finds this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > expression x,e; > @@ > > * x = kzalloc(...) > ... when != x = e > * IS_ERR_OR_NULL(x) > // > > Signed-off-by: Julia Lawall Reviewed-by: Dave Goodell -Dave -- 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/