summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Reinhardt <ole.reinhardt@kernelconcepts.de>2005-12-13 17:03:38 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-13 21:18:16 -0800
commitfb79ffa4ddbe3f6f30fdb8429b5bad84d25ae6ef (patch)
tree2118328f37af59e65e024e34d09d9c902aea47bd
parent118c71bcacce82a4317c9bd99c6a15af14020aee (diff)
[PATCH] fbdev: make pxafb more robust to errors with CONFIG_FB_PXA_PARAMETERS
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>
-rw-r--r--drivers/video/pxafb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 7b4cd250bec8..9fc10b9e6f57 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -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;
}