diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-24 08:36:21 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-12-24 13:34:09 -0500 |
commit | ed5a35acbb48d512332a53565e6341c65eecfa29 (patch) | |
tree | 7bc88d19fd4a2a3cd996b56a7b0c5af7f4370fcb /drivers/video | |
parent | e8b8f5ef90b934bc9eaef7c8960ecd9dda9f7a62 (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/video')
-rw-r--r-- | drivers/video/cyber2000fb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c index da7c01b39be..3a561df2e8a 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) | |||
1633 | failed: | 1633 | failed: |
1634 | iounmap(cfb->region); | 1634 | iounmap(cfb->region); |
1635 | failed_ioremap: | 1635 | failed_ioremap: |
1636 | pci_release_regions(dev); | ||
1637 | failed_regions: | ||
1636 | cyberpro_free_fb_info(cfb); | 1638 | cyberpro_free_fb_info(cfb); |
1637 | failed_release: | 1639 | failed_release: |
1638 | pci_release_regions(dev); | ||
1639 | |||
1640 | return err; | 1640 | return err; |
1641 | } | 1641 | } |
1642 | 1642 | ||