From: Vitaly Wool Date: Thu, 16 Nov 2006 09:19:14 +0000 (-0800) Subject: [PATCH] pnx4008:fix NULL dereference in rgbfb X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b9c10dc59eaaef23e5a47110c20fb554f7dba28;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [PATCH] pnx4008:fix NULL dereference in rgbfb Fix possible NULL dereference in pnxrgbfb. Signed-off-by: Vitaly Wool Cc: James Simmons Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/pnx4008/pnxrgbfb.c b/drivers/video/pnx4008/pnxrgbfb.c index bf36b68856dd..f29e66e2d774 100644 --- a/drivers/video/pnx4008/pnxrgbfb.c +++ b/drivers/video/pnx4008/pnxrgbfb.c @@ -154,7 +154,8 @@ static int __devinit rgbfb_probe(struct platform_device *pdev) goto err1; } - if (!fb_get_options("pnxrgbfb", &option) && !strcmp(option, "nocursor")) + if (!fb_get_options("pnxrgbfb", &option) && option && + !strcmp(option, "nocursor")) rgbfb_ops.fb_cursor = no_cursor; info->node = -1;