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: firefly_0821_release~38603^2~92 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fb79ffa4ddbe3f6f30fdb8429b5bad84d25ae6ef;p=firefly-linux-kernel-4.4.55.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 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; }