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-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb79ffa4ddbe3f6f30fdb8429b5bad84d25ae6ef;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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; }