arm: edma: check irq2ctlr() result
authorKulikov Vasiliy <segooon@gmail.com>
Sat, 17 Jul 2010 15:19:07 +0000 (19:19 +0400)
committerVaibhav Hiremath <hvaibhav@ti.com>
Mon, 23 Jan 2012 19:14:48 +0000 (00:44 +0530)
commit59ed778510acdc3ab8c6ab39072b24f48fde7a14
tree162c7c37ea99191aa89f0da6e80284c1671f0dea
parent53113deb1b5c6ddf5cfdb4e995156e33104c3796
arm: edma: check irq2ctlr() result

If irq2ctlr() fails return IRQ_NONE.
Also as it can fail make 'ctlr' signed.

The semantic patch that finds this problem (many false-positive results):
(http://coccinelle.lip6.fr/)

// <smpl>
@ r1 @
identifier f;
@@
int f(...) { ... }

@@
identifier r1.f;
type T;
unsigned T x;
@@

*x = f(...)
 ...
*x > 0

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
arch/arm/common/edma.c