Skip to content

Commit

Permalink
[PATCH] fbdev: make pxafb more robust to errors with CONFIG_FB_PXA_PA…
Browse files Browse the repository at this point in the history
…RAMETERS

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>
  • Loading branch information
Ole Reinhardt authored and Linus Torvalds committed Dec 14, 2005
1 parent 118c71b commit fb79ffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fb79ffa

Please sign in to comment.