diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2012-09-06 10:23:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-22 11:20:25 -0500 |
commit | bd6973ea6eafc8dd62ba04fea0eb4220efae0d20 (patch) | |
tree | b2eb52f3e20e56371fa39cedae95ba44164b6baf /drivers/media/pci/ngene | |
parent | 216f39385181d9f3eabde1b566871ca86694f6b3 (diff) |
[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 2c2df88b4a9c..8eeec4f50ccb 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, | |||
1691 | dev->i2c_current_bus = -1; | 1691 | dev->i2c_current_bus = -1; |
1692 | 1692 | ||
1693 | /* Register DVB adapters and devices for both channels */ | 1693 | /* Register DVB adapters and devices for both channels */ |
1694 | if (init_channels(dev) < 0) | 1694 | stat = init_channels(dev); |
1695 | if (stat < 0) | ||
1695 | goto fail2; | 1696 | goto fail2; |
1696 | 1697 | ||
1697 | return 0; | 1698 | return 0; |