Skip to content

Commit 8224c3b

Browse files
akpm00torvalds
authored andcommitted
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>
1 parent 0e170c7 commit 8224c3b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/video/w100fb.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,10 @@ int __init w100fb_probe(struct platform_device *pdev)
765765
printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id);
766766
return 0;
767767
out:
768-
fb_dealloc_cmap(&info->cmap);
769-
kfree(info->pseudo_palette);
768+
if (info) {
769+
fb_dealloc_cmap(&info->cmap);
770+
kfree(info->pseudo_palette);
771+
}
770772
if (remapped_fbuf != NULL)
771773
iounmap(remapped_fbuf);
772774
if (remapped_regs != NULL)

0 commit comments

Comments
 (0)