Commit 78c03717 authored by Gerd Knorr's avatar Gerd Knorr Committed by Linus Torvalds

[PATCH] some vesafb fixes

Fix the size passed to release_mem_region in an error path.

Also adjust the message printed when vesafb cannot load; the comment there
already says this must not be fatal, so the message should also not mention
the word 'abort' otherwise indicating a problem to worry about in the log.
Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarGerd Knorr <kraxel@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 27f931da
...@@ -271,7 +271,7 @@ static int __init vesafb_probe(struct device *device) ...@@ -271,7 +271,7 @@ static int __init vesafb_probe(struct device *device)
if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) { if (!request_mem_region(vesafb_fix.smem_start, size_total, "vesafb")) {
printk(KERN_WARNING printk(KERN_WARNING
"vesafb: abort, cannot reserve video memory at 0x%lx\n", "vesafb: cannot reserve video memory at 0x%lx\n",
vesafb_fix.smem_start); vesafb_fix.smem_start);
/* We cannot make this fatal. Sometimes this comes from magic /* We cannot make this fatal. Sometimes this comes from magic
spaces our resource handlers simply don't know about */ spaces our resource handlers simply don't know about */
...@@ -279,13 +279,13 @@ static int __init vesafb_probe(struct device *device) ...@@ -279,13 +279,13 @@ static int __init vesafb_probe(struct device *device)
info = framebuffer_alloc(sizeof(u32) * 256, &dev->dev); info = framebuffer_alloc(sizeof(u32) * 256, &dev->dev);
if (!info) { if (!info) {
release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len); release_mem_region(vesafb_fix.smem_start, size_total);
return -ENOMEM; return -ENOMEM;
} }
info->pseudo_palette = info->par; info->pseudo_palette = info->par;
info->par = NULL; info->par = NULL;
info->screen_base = ioremap(vesafb_fix.smem_start, vesafb_fix.smem_len); info->screen_base = ioremap(vesafb_fix.smem_start, vesafb_fix.smem_len);
if (!info->screen_base) { if (!info->screen_base) {
printk(KERN_ERR printk(KERN_ERR
"vesafb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n", "vesafb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n",
...@@ -386,7 +386,7 @@ static int __init vesafb_probe(struct device *device) ...@@ -386,7 +386,7 @@ static int __init vesafb_probe(struct device *device)
request_region(0x3c0, 32, "vesafb"); request_region(0x3c0, 32, "vesafb");
if (mtrr) { if (mtrr) {
int temp_size = size_total; unsigned int temp_size = size_total;
/* Find the largest power-of-two */ /* Find the largest power-of-two */
while (temp_size & (temp_size - 1)) while (temp_size & (temp_size - 1))
temp_size &= (temp_size - 1); temp_size &= (temp_size - 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment