Re: [PATCH] iommu: omap-iommu.c: remove unnecessary null pointercheck

From: Tony Lindgren
Date: Tue Jan 22 2013 - 15:17:44 EST


* Ohad Ben-Cohen <ohad@xxxxxxxxxx> [130118 12:58]:
> On Fri, Jan 18, 2013 at 10:42 PM, Cong Ding <dinggnu@xxxxxxxxx> 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 <dinggnu@xxxxxxxxx>
>
> Acked-by: Ohad Ben-Cohen <ohad@xxxxxxxxxx>

Yes looks like that's a pointless check and would already obj being NULL would
fail earlier in those functions:

Acked-by: Tony Lindgren <tony@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/