Re: [PATCH 10/14] drivers/ata/libata: Move dereference after NULLtest

From: Jeff Garzik
Date: Tue Nov 03 2009 - 16:18:03 EST

On 10/17/2009 02:41 AM, Julia Lawall wrote:
From: Julia Lawall<julia@xxxxxxx>

In each case, if the NULL test on qc is needed, then the derefernce
should be after the NULL test.

A simplified version of the semantic match that detects this problem is as
follows (

@match exists@
expression x, E;
identifier fld;

* x->fld
... when != \(x = E\|&x\)
* x == NULL

Signed-off-by: Julia Lawall<julia@xxxxxxx>


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at