Commit 7de05a30 authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] fbdev: Fix access to ROM in aty128fb

Fix access to ROM in aty128fb.  Found by sparse.
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3c9bedd1
...@@ -939,7 +939,7 @@ static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) ...@@ -939,7 +939,7 @@ static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par)
rom_base = ioremap(segstart, 0x10000); rom_base = ioremap(segstart, 0x10000);
if (rom_base == NULL) if (rom_base == NULL)
return NULL; return NULL;
if ((*rom_base == 0x55) && (((*(rom_base + 1)) & 0xff) == 0xaa)) if (readb(rom_base) == 0x55 && readb(rom_base + 1) == 0xaa)
break; break;
iounmap(rom_base); iounmap(rom_base);
rom_base = NULL; rom_base = NULL;
......
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