Skip to content
Commit 4f066173 authored by Julia Lawall's avatar Julia Lawall Committed by Mark Brown
Browse files

ASoC: Move dereference after NULL test



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: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 8d567b6b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment