Commit 4aedf566 authored by Peter Senna Tschudin's avatar Peter Senna Tschudin Committed by Florian Tobias Schandinat

drivers/video/mb862xx/mb862xxfbdrv.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: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent 5fdc62ca
...@@ -1052,12 +1052,14 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev, ...@@ -1052,12 +1052,14 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev,
break; break;
default: default:
/* should never occur */ /* should never occur */
ret = -EIO;
goto rel_reg; goto rel_reg;
} }
par->fb_base = ioremap(par->fb_base_phys, par->mapped_vram); par->fb_base = ioremap(par->fb_base_phys, par->mapped_vram);
if (par->fb_base == NULL) { if (par->fb_base == NULL) {
dev_err(dev, "Cannot map framebuffer\n"); dev_err(dev, "Cannot map framebuffer\n");
ret = -EIO;
goto rel_reg; goto rel_reg;
} }
...@@ -1073,11 +1075,13 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev, ...@@ -1073,11 +1075,13 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev,
dev_dbg(dev, "mmio phys 0x%llx 0x%lx\n", dev_dbg(dev, "mmio phys 0x%llx 0x%lx\n",
(unsigned long long)par->mmio_base_phys, (ulong)par->mmio_len); (unsigned long long)par->mmio_base_phys, (ulong)par->mmio_len);
if (mb862xx_pci_gdc_init(par)) ret = mb862xx_pci_gdc_init(par);
if (ret)
goto io_unmap; goto io_unmap;
if (request_irq(par->irq, mb862xx_intr, IRQF_SHARED, ret = request_irq(par->irq, mb862xx_intr, IRQF_SHARED,
DRV_NAME, (void *)par)) { DRV_NAME, (void *)par);
if (ret) {
dev_err(dev, "Cannot request irq\n"); dev_err(dev, "Cannot request irq\n");
goto io_unmap; goto io_unmap;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment