Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43776
b: refs/heads/master
c: a02f640
h: refs/heads/master
v: v3
  • Loading branch information
Amol Lad authored and Linus Torvalds committed Dec 8, 2006
1 parent 561312c commit aa0ff6c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b88a57cc645c59a3652f391f8069b15d42ac0762
refs/heads/master: a02f6402d5a18f5a4fd35cb82887c1097d0f7792
22 changes: 17 additions & 5 deletions trunk/drivers/video/tridentfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,8 @@ static int __devinit trident_pci_probe(struct pci_dev * dev, const struct pci_de

if (!request_mem_region(tridentfb_fix.smem_start, tridentfb_fix.smem_len, "tridentfb")) {
debug("request_mem_region failed!\n");
return -1;
err = -1;
goto out_unmap;
}

fb_info.screen_base = ioremap_nocache(tridentfb_fix.smem_start,
Expand All @@ -1139,7 +1140,8 @@ static int __devinit trident_pci_probe(struct pci_dev * dev, const struct pci_de
if (!fb_info.screen_base) {
release_mem_region(tridentfb_fix.smem_start, tridentfb_fix.smem_len);
debug("ioremap failed\n");
return -1;
err = -1;
goto out_unmap;
}

output("%s board found\n", pci_name(dev));
Expand All @@ -1162,8 +1164,10 @@ static int __devinit trident_pci_probe(struct pci_dev * dev, const struct pci_de
#endif
fb_info.pseudo_palette = pseudo_pal;

if (!fb_find_mode(&default_var,&fb_info,mode,NULL,0,NULL,bpp))
return -EINVAL;
if (!fb_find_mode(&default_var,&fb_info,mode,NULL,0,NULL,bpp)) {
err = -EINVAL;
goto out_unmap;
}
fb_alloc_cmap(&fb_info.cmap,256,0);
if (defaultaccel && acc)
default_var.accel_flags |= FB_ACCELF_TEXT;
Expand All @@ -1174,12 +1178,20 @@ static int __devinit trident_pci_probe(struct pci_dev * dev, const struct pci_de
fb_info.device = &dev->dev;
if (register_framebuffer(&fb_info) < 0) {
printk(KERN_ERR "tridentfb: could not register Trident framebuffer\n");
return -EINVAL;
err = -EINVAL;
goto out_unmap;
}
output("fb%d: %s frame buffer device %dx%d-%dbpp\n",
fb_info.node, fb_info.fix.id,default_var.xres,
default_var.yres,default_var.bits_per_pixel);
return 0;

out_unmap:
if (default_par.io_virt)
iounmap(default_par.io_virt);
if (fb_info.screen_base)
iounmap(fb_info.screen_base);
return err;
}

static void __devexit trident_pci_remove(struct pci_dev * dev)
Expand Down

0 comments on commit aa0ff6c

Please sign in to comment.