From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755876Ab3AVUR7 (ORCPT ); Tue, 22 Jan 2013 15:17:59 -0500 Received: from mho-04-ewr.mailhop.org ([204.13.248.74]:16245 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755579Ab3AVUR6 (ORCPT ); Tue, 22 Jan 2013 15:17:58 -0500 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 50.131.214.131 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19XdRxmcR1OinlkFZeuKtA/ Date: Tue, 22 Jan 2013 12:17:53 -0800 From: Tony Lindgren To: Ohad Ben-Cohen Cc: Cong Ding , Joerg Roedel , Omar Ramirez Luna , Mauro Carvalho Chehab , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] iommu: omap-iommu.c: remove unnecessary null pointer check Message-ID: <20130122201752.GS22517@atomide.com> References: <1358541741-20708-1-git-send-email-dinggnu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ohad Ben-Cohen [130118 12:58]: > On Fri, Jan 18, 2013 at 10:42 PM, Cong Ding wrote: > > The pointer obj is dereferenced in line 146 and 149 respectively, so it is not > > necessary to check null again in line 149 and 175. And I have checked that all > > the callers of these two functions guarantee the parameter obj passed is not > > null. > > > > Signed-off-by: Cong Ding > > Acked-by: Ohad Ben-Cohen Yes looks like that's a pointless check and would already obj being NULL would fail earlier in those functions: Acked-by: Tony Lindgren