drm: check return value of liftoff_device_register_all_planes
This commit is contained in:
parent
82897e1fbf
commit
802d86c4bc
2 changed files with 7 additions and 5 deletions
10
src/drm.cpp
10
src/drm.cpp
|
@ -575,11 +575,13 @@ int init_drm(struct drm_t *drm, const char *device_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
drm->lo_device = liftoff_device_create( drm->fd );
|
drm->lo_device = liftoff_device_create( drm->fd );
|
||||||
|
if ( drm->lo_device == nullptr )
|
||||||
|
return -1;
|
||||||
drm->lo_output = liftoff_output_create( drm->lo_device, drm->crtc->id );
|
drm->lo_output = liftoff_output_create( drm->lo_device, drm->crtc->id );
|
||||||
|
if ( drm->lo_output == nullptr )
|
||||||
liftoff_device_register_all_planes( drm->lo_device );
|
return -1;
|
||||||
|
if ( liftoff_device_register_all_planes( drm->lo_device ) < 0 )
|
||||||
assert( drm->lo_device && drm->lo_output );
|
return -1;
|
||||||
|
|
||||||
for ( int i = 0; i < k_nMaxLayers; i++ )
|
for ( int i = 0; i < k_nMaxLayers; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 61fd4c099a43b3b22dd48ccdbd76b4c3ab897d25
|
Subproject commit 516cf9404df801b069065d14315cf6322f64a209
|
Loading…
Reference in a new issue