[PATCH] pnx4008:fix NULL dereference in rgbfb

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>
This commit is contained in:
Vitaly Wool 2006-11-16 01:19:14 -08:00 committed by Linus Torvalds
parent 84a763e3d1
commit 3b9c10dc59

View 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;