[media] cx25821: fix error return code and clean up
authorPeter Senna Tschudin <peter.senna@gmail.com>
Mon, 17 Sep 2012 07:04:56 +0000 (04:04 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 22 Nov 2012 18:46:34 +0000 (16:46 -0200)
The function cx25821_sram_channel_setup_upstream_audio always return zero,
so the return value is not saved any more.
Convert a nonnegative 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/)
// <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: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

No differences found