From: Ole Reinhardt Date: Wed, 14 Dec 2005 01:03:38 +0000 (-0800) Subject: [PATCH] fbdev: make pxafb more robust to errors with CONFIG_FB_PXA_PARAMETERS X-Git-Tag: v2.6.15-rc6~70 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fb79ffa4ddbe3f6f30fdb8429b5bad84d25ae6ef;p=~emulex%2Finfiniband.git [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 Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 7b4cd250bec..9fc10b9e6f5 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; }