diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2012-09-18 08:07:58 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-09-22 17:41:52 -0400 |
commit | 7c4c72f4438e3e99ad39b2a86e477fb1c6fd1f3f (patch) | |
tree | cf92b44daea44c107d4bbcc2bb3079b39c0d723a /drivers/video/cyber2000fb.c | |
parent | 0ca30b1b6aaab682ce762809f93bb78d6650de89 (diff) |
drivers/video/cyber2000fb.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: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/cyber2000fb.c')
-rw-r--r-- | drivers/video/cyber2000fb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index c1527f5b47ee..e40125cb313e 100644 --- a/drivers/video/cyber2000fb.c +++ b/drivers/video/cyber2000fb.c | |||
@@ -1804,8 +1804,10 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
1804 | 1804 | ||
1805 | cfb->irq = dev->irq; | 1805 | cfb->irq = dev->irq; |
1806 | cfb->region = pci_ioremap_bar(dev, 0); | 1806 | cfb->region = pci_ioremap_bar(dev, 0); |
1807 | if (!cfb->region) | 1807 | if (!cfb->region) { |
1808 | err = -ENOMEM; | ||
1808 | goto failed_ioremap; | 1809 | goto failed_ioremap; |
1810 | } | ||
1809 | 1811 | ||
1810 | cfb->regs = cfb->region + MMIO_OFFSET; | 1812 | cfb->regs = cfb->region + MMIO_OFFSET; |
1811 | cfb->fb.device = &dev->dev; | 1813 | cfb->fb.device = &dev->dev; |