video/fb: initializes the info structure

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
pengyiqiang 2022-12-19 17:55:02 +08:00 committed by Petro Karashchenko
parent fd0d6a9bf5
commit 72fdea5c13

View file

@ -388,6 +388,7 @@ static int fb_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
DEBUGASSERT(fb->vtable != NULL &&
fb->vtable->getoverlayinfo != NULL);
memset(&oinfo, 0, sizeof(oinfo));
ret = fb->vtable->getoverlayinfo(fb->vtable, arg, &oinfo);
if (ret == OK)
{
@ -555,6 +556,7 @@ static int fb_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
break;
}
memset(&pinfo, 0, sizeof(pinfo));
ret = fb->vtable->getplaneinfo(fb->vtable, fb->plane, &pinfo);
if (ret < 0)
{
@ -648,6 +650,7 @@ static int fb_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
break;
}
memset(&pinfo, 0, sizeof(pinfo));
ret = fb->vtable->getplaneinfo(fb->vtable, fb->plane, &pinfo);
if (ret < 0)
{
@ -826,6 +829,7 @@ int fb_register(int display, int plane)
DEBUGASSERT(vinfo.nplanes > 0 && (unsigned)plane < vinfo.nplanes);
DEBUGASSERT(fb->vtable->getplaneinfo != NULL);
memset(&pinfo, 0, sizeof(pinfo));
ret = fb->vtable->getplaneinfo(fb->vtable, plane, &pinfo);
if (ret < 0)
{
@ -845,6 +849,7 @@ int fb_register(int display, int plane)
/* Initialize first overlay but do not select */
DEBUGASSERT(fb->vtable->getoverlayinfo != NULL);
memset(&oinfo, 0, sizeof(oinfo));
ret = fb->vtable->getoverlayinfo(fb->vtable, 0, &oinfo);
if (ret < 0)
{