提交 fb79ffa4 编写于 作者: O Ole Reinhardt 提交者: Linus Torvalds

[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: NNicolas Pitre <nico@cam.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 118c71bc
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册