summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@gmail.com>2012-09-06 11:23:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-22 14:20:25 -0200
commitbd6973ea6eafc8dd62ba04fea0eb4220efae0d20 (patch)
treeb2eb52f3e20e56371fa39cedae95ba44164b6baf /drivers/media
parent216f39385181d9f3eabde1b566871ca86694f6b3 (diff)
downloadop-kernel-dev-bd6973ea6eafc8dd62ba04fea0eb4220efae0d20.zip
op-kernel-dev-bd6973ea6eafc8dd62ba04fea0eb4220efae0d20.tar.gz
[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')
-rw-r--r--drivers/media/pci/ngene/ngene-core.c3
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;
OpenPOWER on IntegriCloud