video/fb: initializes the info structure
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
fd0d6a9bf5
commit
72fdea5c13
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue