Re: [PATCH 9/10] drivers/mmc: Move a dereference below a NULL test

From: Alan Cox
Date: Mon Jul 20 2009 - 08:46:44 EST


> It is not a "NULL check" it is an assertion, which can be compiled out.
> On some platforms BUG is implemented as a null dereference anyway
> e.g. on ARM it is *(int *)0 = 0;

It's a bogus check because the

struct mmc_omap_host *host = slot->host;

has already been executed before you check for slot == NULL

--
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/