upstream: [media] e4000: fix error return code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 29 Dec 2013 22:47:35 +0000 (19:47 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:24 +0000 (11:54 +0900)
commitb4f681be185ce751a0a3271f62b3d55c260af0c7
tree56838b3c7646e1a9b523421ac0ac7fcfeb945d96
parentf784877675b4e51b606b7303038c07b5eb3c9ee4
upstream: [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