diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2012-09-06 14:23:54 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-22 16:20:25 (GMT) |
commit | bd6973ea6eafc8dd62ba04fea0eb4220efae0d20 (patch) | |
tree | b2eb52f3e20e56371fa39cedae95ba44164b6baf /drivers/media/pci/ngene | |
parent | 216f39385181d9f3eabde1b566871ca86694f6b3 (diff) | |
download | linux-fsl-qoriq-bd6973ea6eafc8dd62ba04fea0eb4220efae0d20.tar.xz |
[media] drivers/media/pci/ngene/ngene-core.c: fix error return code
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>
Diffstat (limited to 'drivers/media/pci/ngene')
-rw-r--r-- | drivers/media/pci/ngene/ngene-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index 2c2df88..8eeec4f 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c @@ -1691,7 +1691,8 @@ int __devinit ngene_probe(struct pci_dev *pci_dev, dev->i2c_current_bus = -1; /* Register DVB adapters and devices for both channels */ - if (init_channels(dev) < 0) + stat = init_channels(dev); + if (stat < 0) goto fail2; return 0; |