diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-14 16:58:37 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-05-29 09:00:03 -0400 |
commit | cc4401142c1cbc63b01d6024cbc7a9f804cb3143 (patch) | |
tree | fd28d49904845d402661bffa0c618e4448529d83 /drivers/video | |
parent | d85d135d8babbc917b370f36cbc02b7b4a2f2d99 (diff) |
fb: handle NULL pointers in framebuffer release
This function is called with a potential NULL pointer in
picolcd_init_framebuffer() and it causes a static checker warning. This
used to handle NULL pointers when the picolcd code was written, but a
couple months later we added the "info->apertures" dereference.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbsysfs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index 67afa9c2289d..a55e3669d135 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
@@ -80,6 +80,8 @@ EXPORT_SYMBOL(framebuffer_alloc); | |||
80 | */ | 80 | */ |
81 | void framebuffer_release(struct fb_info *info) | 81 | void framebuffer_release(struct fb_info *info) |
82 | { | 82 | { |
83 | if (!info) | ||
84 | return; | ||
83 | kfree(info->apertures); | 85 | kfree(info->apertures); |
84 | kfree(info); | 86 | kfree(info); |
85 | } | 87 | } |