diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2008-04-28 05:15:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:41 -0400 |
commit | 8224c3b166db81a8dbd128df455453897fe2b48b (patch) | |
tree | 757864098a1a49311d359613cd6c3135f18e6772 /drivers | |
parent | 0e170c72c0c55bd78213a0f5053bd9a1dde403b7 (diff) |
drivers/video/w100fb.c: avoid a couple of error-path NULL derefs
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/w100fb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c index 003c49a490eb..30469bf906e5 100644 --- a/drivers/video/w100fb.c +++ b/drivers/video/w100fb.c | |||
@@ -765,8 +765,10 @@ int __init w100fb_probe(struct platform_device *pdev) | |||
765 | printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id); | 765 | printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id); |
766 | return 0; | 766 | return 0; |
767 | out: | 767 | out: |
768 | fb_dealloc_cmap(&info->cmap); | 768 | if (info) { |
769 | kfree(info->pseudo_palette); | 769 | fb_dealloc_cmap(&info->cmap); |
770 | kfree(info->pseudo_palette); | ||
771 | } | ||
770 | if (remapped_fbuf != NULL) | 772 | if (remapped_fbuf != NULL) |
771 | iounmap(remapped_fbuf); | 773 | iounmap(remapped_fbuf); |
772 | if (remapped_regs != NULL) | 774 | if (remapped_regs != NULL) |