aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-12-24 08:36:21 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-24 13:34:09 -0500
commited5a35acbb48d512332a53565e6341c65eecfa29 (patch)
tree7bc88d19fd4a2a3cd996b56a7b0c5af7f4370fcb /drivers
parente8b8f5ef90b934bc9eaef7c8960ecd9dda9f7a62 (diff)
VIDEO: cyberpro: pci_request_regions needs a persistent name
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/cyber2000fb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index da7c01b39be2..3a561df2e8a2 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -1573,15 +1573,15 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
1573 if (err) 1573 if (err)
1574 return err; 1574 return err;
1575 1575
1576 err = pci_request_regions(dev, name);
1577 if (err)
1578 return err;
1579
1580 err = -ENOMEM; 1576 err = -ENOMEM;
1581 cfb = cyberpro_alloc_fb_info(id->driver_data, name); 1577 cfb = cyberpro_alloc_fb_info(id->driver_data, name);
1582 if (!cfb) 1578 if (!cfb)
1583 goto failed_release; 1579 goto failed_release;
1584 1580
1581 err = pci_request_regions(dev, cfb->fb.fix.id);
1582 if (err)
1583 goto failed_regions;
1584
1585 cfb->dev = dev; 1585 cfb->dev = dev;
1586 cfb->region = pci_ioremap_bar(dev, 0); 1586 cfb->region = pci_ioremap_bar(dev, 0);
1587 if (!cfb->region) 1587 if (!cfb->region)
@@ -1633,10 +1633,10 @@ cyberpro_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
1633failed: 1633failed:
1634 iounmap(cfb->region); 1634 iounmap(cfb->region);
1635failed_ioremap: 1635failed_ioremap:
1636 pci_release_regions(dev);
1637failed_regions:
1636 cyberpro_free_fb_info(cfb); 1638 cyberpro_free_fb_info(cfb);
1637failed_release: 1639failed_release:
1638 pci_release_regions(dev);
1639
1640 return err; 1640 return err;
1641} 1641}
1642 1642