drm/qxl: use drmm_mode_config_init

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-4-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2021-02-04 15:57:04 +01:00
parent 93d8da8d7e
commit f8752f14c9

View File

@ -1195,7 +1195,9 @@ int qxl_modeset_init(struct qxl_device *qdev)
int i;
int ret;
drm_mode_config_init(&qdev->ddev);
ret = drmm_mode_config_init(&qdev->ddev);
if (ret)
return ret;
ret = qxl_create_monitors_object(qdev);
if (ret)
@ -1228,5 +1230,4 @@ int qxl_modeset_init(struct qxl_device *qdev)
void qxl_modeset_fini(struct qxl_device *qdev)
{
qxl_destroy_monitors_object(qdev);
drm_mode_config_cleanup(&qdev->ddev);
}