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>
This commit is contained in:
Dan Carpenter 2012-05-14 23:58:37 +03:00 коммит произвёл Florian Tobias Schandinat
Родитель d85d135d8b
Коммит cc4401142c
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -80,6 +80,8 @@ EXPORT_SYMBOL(framebuffer_alloc);
*/
void framebuffer_release(struct fb_info *info)
{
if (!info)
return;
kfree(info->apertures);
kfree(info);
}