2021-01-20 12:06:09

by Gerd Hoffmann

[permalink] [raw]
Subject: [PATCH v3 1/4] drm/qxl: use drmm_mode_config_init

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
---
drivers/gpu/drm/qxl/qxl_display.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 012bce0cdb65..38d6b596094d 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -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);
}
--
2.29.2


2021-01-22 08:08:51

by Thomas Zimmermann

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] drm/qxl: use drmm_mode_config_init



Am 20.01.21 um 12:12 schrieb Gerd Hoffmann:
> Signed-off-by: Gerd Hoffmann <[email protected]>
> Reviewed-by: Daniel Vetter <[email protected]>

Acked-by: Thomas Zimmermann <[email protected]>

> ---
> drivers/gpu/drm/qxl/qxl_display.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
> index 012bce0cdb65..38d6b596094d 100644
> --- a/drivers/gpu/drm/qxl/qxl_display.c
> +++ b/drivers/gpu/drm/qxl/qxl_display.c
> @@ -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);
> }
>

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


Attachments:
OpenPGP_signature (855.00 B)
OpenPGP digital signature