ASoC: Move dereference after NULL test
authorJulia Lawall <julia@diku.dk>
Sat, 17 Oct 2009 06:32:56 +0000 (08:32 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 19 Oct 2009 15:12:35 +0000 (16:12 +0100)
If the NULL test on jack 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 (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

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

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found