[PATCH] staging:iio: correct error check

2014-01-01 Thread Julia Lawall
From: Julia Lawall iio_kfifo_allocate returns NULL in case of error. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression *x; identifier f; statement S1,S2; @@ *x = f(...); if (x) { <+... when != if (...) S1 else S2 -ENOMEM ...+> } //

Re: [PATCH] staging:iio: correct error check

2014-01-01 Thread Jonathan Cameron
On 01/01/14 13:07, Julia Lawall wrote: From: Julia Lawall iio_kfifo_allocate returns NULL in case of error. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression *x; identifier f; statement S1,S2; @@ *x = f(...); if (x) { <+... when != i

[PATCH][Resend] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c

2014-01-01 Thread Chase Southwood
From: Chase Southwood This is a patch for pcmmio.c that changes several printk() calls to dev_dbg() or dev_err() to fix checkpatch.pl warnings. Patched from 3.13-rc6. Signed-off-by: Chase Southwood --- drivers/staging/comedi/drivers/pcmmio.c | 23 +-- 1 file changed, 13 i