diff options
author | Julia Lawall <julia@diku.dk> | 2010-10-18 16:11:13 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-10-19 01:29:24 +0200 |
commit | 02ffc5f3f91c265e110ddd1fdd7019a18426ebe5 (patch) | |
tree | 0243071f64cda3a3a11de7c6a93635e69d49b38f /sound/soc/codecs/max98088.h | |
parent | Revert "ASoC: Add max98088 CODEC driver" (diff) | |
download | linux-02ffc5f3f91c265e110ddd1fdd7019a18426ebe5.tar.xz linux-02ffc5f3f91c265e110ddd1fdd7019a18426ebe5.zip |
ASoC: davinci-mcasp.c: Return error code in failure
In this code, 0 is returned on failure, even though other
failures return -ENOMEM or other similar values.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@a@
identifier alloc;
identifier ret;
constant C;
expression x;
@@
x = alloc(...);
if (x == NULL) { <+... \(ret = -C; \| return -C; \) ...+> }
@@
identifier f, a.alloc;
expression ret;
expression x,e1,e2,e3;
@@
ret = 0
... when != ret = e1
*x = alloc(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
return ret;
}
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/max98088.h')
0 files changed, 0 insertions, 0 deletions