[PATCH] pnx4008:fix NULL dereference in rgbfb
authorVitaly Wool <vwool@ru.mvista.com>
Thu, 16 Nov 2006 09:19:14 +0000 (01:19 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 16 Nov 2006 19:43:37 +0000 (11:43 -0800)
Fix possible NULL dereference in pnxrgbfb.

Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/pnx4008/pnxrgbfb.c

index bf36b68856dda053b9a876c8abd190946962d2f4..f29e66e2d774976de39115a49e0d5e2fce9e2414 100644 (file)
@@ -154,7 +154,8 @@ static int __devinit rgbfb_probe(struct platform_device *pdev)
                        goto err1;
        }
 
-       if (!fb_get_options("pnxrgbfb", &option) && !strcmp(option, "nocursor"))
+       if (!fb_get_options("pnxrgbfb", &option) && option &&
+                       !strcmp(option, "nocursor"))
                rgbfb_ops.fb_cursor = no_cursor;
 
        info->node = -1;