diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2014-05-20 23:35:59 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-05-23 13:47:31 +0300 |
commit | d9a5f87c8fb49010d4fc1e41e263072b7e9916b1 (patch) | |
tree | 2ae228b1cf266c06458bfbd4763bdfd646b823af | |
parent | 972754cfaee94d6e25acf94a497bc0a864d91b7e (diff) |
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: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/fbdev/grvga.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c index c078701f15f..2db5bb1a33e 100644 --- a/drivers/video/fbdev/grvga.c +++ b/drivers/video/fbdev/grvga.c @@ -514,9 +514,10 @@ free_fb: 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); |