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>
This commit is contained in:
parent
972754cfae
commit
d9a5f87c8f
@ -514,9 +514,10 @@ static int grvga_probe(struct platform_device *dev)
|
|||||||
static int grvga_remove(struct platform_device *device)
|
static int grvga_remove(struct platform_device *device)
|
||||||
{
|
{
|
||||||
struct fb_info *info = dev_get_drvdata(&device->dev);
|
struct fb_info *info = dev_get_drvdata(&device->dev);
|
||||||
struct grvga_par *par = info->par;
|
struct grvga_par *par;
|
||||||
|
|
||||||
if (info) {
|
if (info) {
|
||||||
|
par = info->par;
|
||||||
unregister_framebuffer(info);
|
unregister_framebuffer(info);
|
||||||
fb_dealloc_cmap(&info->cmap);
|
fb_dealloc_cmap(&info->cmap);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user