Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932147AbdC2JeA (ORCPT ); Wed, 29 Mar 2017 05:34:00 -0400 Received: from a3.inai.de ([88.198.180.161]:41856 "EHLO a3.inai.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754593AbdC2Jd5 (ORCPT ); Wed, 29 Mar 2017 05:33:57 -0400 Date: Wed, 29 Mar 2017 11:33:54 +0200 (CEST) From: Jan Engelhardt To: SIMRAN SINGHAL cc: wensong@linux-vs.org, Simon Horman , Julian Anastasov , Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , netdev@vger.kernel.org, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org, outreachy-kernel Subject: Re: [PATCH v2] netfilter: Clean up tests if NULL returned on failure In-Reply-To: Message-ID: References: <20170328131340.GA19688@singhal-Inspiron-5558> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 336 Lines: 11 On Wednesday 2017-03-29 11:15, SIMRAN SINGHAL wrote: >>>>>> dest = kzalloc(sizeof(struct ip_vs_dest), GFP_KERNEL); >>>>>>- if (dest == NULL) >>>>>>+ if (!dest) >>>>>> return -ENOMEM; > >But, according to me we should prefer !var over ( var ==NULL ) according to the >coding style Where does it say that?