]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] fbdev: make pxafb more robust to errors with CONFIG_FB_PXA_PARAMETERS
authorOle Reinhardt <ole.reinhardt@kernelconcepts.de>
Wed, 14 Dec 2005 01:03:38 +0000 (17:03 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 14 Dec 2005 05:18:16 +0000 (21:18 -0800)
pxafb.c runs into an oops if CONFIG_FB_PXA_PARAMETERS is enabled and no
parameters are set in command line.  The following patch avoids this
problem.

Signed-off-by: Nicolas Pitre <nico@cam.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/pxafb.c

index 7b4cd250bec8fd9fca0bf6961b8a21a96a4902f6..9fc10b9e6f578115ce97d28ac7503cb477bfecf3 100644 (file)
@@ -1396,7 +1396,8 @@ static struct platform_driver pxafb_driver = {
 int __devinit pxafb_setup(char *options)
 {
 # ifdef CONFIG_FB_PXA_PARAMETERS
-       strlcpy(g_options, options, sizeof(g_options));
+       if (options)
+               strlcpy(g_options, options, sizeof(g_options));
 # endif
        return 0;
 }