Commit d9a5f87c authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Tomi Valkeinen

video: fbdev: grvga.c: Fix for possible null pointer dereference

There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 972754cf
......@@ -514,9 +514,10 @@ static int grvga_probe(struct platform_device *dev)
static int grvga_remove(struct platform_device *device)
{
struct fb_info *info = dev_get_drvdata(&device->dev);
struct grvga_par *par = info->par;
struct grvga_par *par;
if (info) {
par = info->par;
unregister_framebuffer(info);
fb_dealloc_cmap(&info->cmap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment