[media] e4000: fix error return code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 29 Dec 2013 22:47:35 +0000 (19:47 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 11:34:05 +0000 (09:34 -0200)
commit58f087c9b670ea7001d640fadbf7e4e91e739d6b
tree5f04a0df90d40ef0ff3670d7a946623e5cf919dd
parent6c49d79381f4bacacdef50a1902c92833e765c63
[media] e4000: fix error return code

Set the return variable to an error code as done elsewhere in the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/tuners/e4000.c