From: Julia Lawall Date: Tue, 14 Aug 2012 12:58:32 +0000 (+0200) Subject: drivers/dma/amba-pl08x.c: fix error return code X-Git-Tag: v3.7-rc1~68^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=983d7beb7de4ba7c715ea62e982c9fe54fa554a1;p=pandora-kernel.git drivers/dma/amba-pl08x.c: fix error return code Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ... return ...; } | ret = 0 ) ... when != ret = e1 *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...); ... when != x = e2 when != ret = e3 *if (x == NULL || ...) { ... when != ret = e4 * return ret; } // Signed-off-by: Julia Lawall Signed-off-by: Vinod Koul --- Reading git-diff-tree failed