Skip to content

Commit

Permalink
drivers/video/w100fb.c: avoid a couple of error-path NULL derefs
Browse files Browse the repository at this point in the history
Fix a couple of error-patch oopses identified by Marcio Buss in
http://bugzilla.kernel.org/show_bug.cgi?id=9567.

Cc: Marcio Buss <marciobuss@gmail.com>
Cc: Jeff Zhou <xinzhou.sjtu@gmail.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Apr 28, 2008
1 parent 0e170c7 commit 8224c3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/video/w100fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,10 @@ int __init w100fb_probe(struct platform_device *pdev)
printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id);
return 0;
out:
fb_dealloc_cmap(&info->cmap);
kfree(info->pseudo_palette);
if (info) {
fb_dealloc_cmap(&info->cmap);
kfree(info->pseudo_palette);
}
if (remapped_fbuf != NULL)
iounmap(remapped_fbuf);
if (remapped_regs != NULL)
Expand Down

0 comments on commit 8224c3b

Please sign in to comment.