summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-12-24 13:36:21 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-12-24 18:34:09 +0000
commited5a35acbb48d512332a53565e6341c65eecfa29 (patch)
tree7bc88d19fd4a2a3cd996b56a7b0c5af7f4370fcb /drivers/video
parente8b8f5ef90b934bc9eaef7c8960ecd9dda9f7a62 (diff)
downloadop-kernel-dev-ed5a35acbb48d512332a53565e6341c65eecfa29.zip
op-kernel-dev-ed5a35acbb48d512332a53565e6341c65eecfa29.tar.gz
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index da7c01b..3a561df2 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)
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)
@@ -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;
}
OpenPOWER on IntegriCloud