Tag: b5170978b421222ba4c3d64d1ebd4a03d64ae42e

mtd: spear_smi: failure test for null rather than negative integer

Author: Julia Lawall <Julia.Lawall@lip6.fr> dev_get_platdata returns a pointer, so the failure value would be NULL rather than a negative integer. The semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // @@ expression x,e; statement S1,S2; @@ *x = dev_get_platdata(…) … when != x = e *if (x < 0) S1 else S2 // Signed-off-by: Julia …

Continue reading