drm_hwcomposer: Don't try to get configs for a disconnected connector
Short circuit getting the configs for connectors which are disconnected. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: Ieabbf08f4d4a6c8b03f948399113e3ad04a2d93a
This commit is contained in:
parent
fa406a10d4
commit
a4283c5cc8
1 changed files with 8 additions and 1 deletions
|
|
@ -721,8 +721,15 @@ static int hwc_get_display_configs(struct hwc_composer_device_1* dev,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (hd->configs)
|
||||
if (hd->configs) {
|
||||
free(hd->configs);
|
||||
hd->configs = NULL;
|
||||
}
|
||||
|
||||
if (c->connection == DRM_MODE_DISCONNECTED) {
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
||||
hd->configs = (drmModeModeInfoPtr)calloc(c->count_modes,
|
||||
sizeof(*hd->configs));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue