Skip to content

Commit

Permalink
VIDEO: cyberpro: pci_request_regions needs a persistent name
Browse files Browse the repository at this point in the history
Don't pass a name pointer from the kernel stack, it will not survive
and will result in corrupted /proc/iomem output.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Dec 24, 2009
1 parent e8b8f5e commit ed5a35a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/video/cyber2000fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1573,15 +1573,15 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
if (err)
return err;

err = pci_request_regions(dev, name);
if (err)
return err;

err = -ENOMEM;
cfb = cyberpro_alloc_fb_info(id->driver_data, name);
if (!cfb)
goto failed_release;

err = pci_request_regions(dev, cfb->fb.fix.id);
if (err)
goto failed_regions;

cfb->dev = dev;
cfb->region = pci_ioremap_bar(dev, 0);
if (!cfb->region)
Expand Down Expand Up @@ -1633,10 +1633,10 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
failed:
iounmap(cfb->region);
failed_ioremap:
pci_release_regions(dev);
failed_regions:
cyberpro_free_fb_info(cfb);
failed_release:
pci_release_regions(dev);

return err;
}

Expand Down

0 comments on commit ed5a35a

Please sign in to comment.