diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2014-05-20 17:35:59 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-05-23 06:47:31 -0400 |
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 c078701f15f6..2db5bb1a33e8 100644 --- a/drivers/video/fbdev/grvga.c +++ b/drivers/video/fbdev/grvga.c | |||
@@ -514,9 +514,10 @@ free_fb: | |||
514 | static int grvga_remove(struct platform_device *device) | 514 | static int grvga_remove(struct platform_device *device) |
515 | { | 515 | { |
516 | struct fb_info *info = dev_get_drvdata(&device->dev); | 516 | struct fb_info *info = dev_get_drvdata(&device->dev); |
517 | struct grvga_par *par = info->par; | 517 | struct grvga_par *par; |
518 | 518 | ||
519 | if (info) { | 519 | if (info) { |
520 | par = info->par; | ||
520 | unregister_framebuffer(info); | 521 | unregister_framebuffer(info); |
521 | fb_dealloc_cmap(&info->cmap); | 522 | fb_dealloc_cmap(&info->cmap); |
522 | 523 | ||