* [PATCH 35/52] drm/meson: Drop explicit drm_mode_config_cleanup call
[not found] <20200219102122.1607365-1-daniel.vetter@ffwll.ch>
@ 2020-02-19 10:21 ` Daniel Vetter
2020-02-19 10:39 ` Neil Armstrong
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Vetter @ 2020-02-19 10:21 UTC (permalink / raw)
To: DRI Development
Cc: Neil Armstrong, Daniel Vetter, Daniel Vetter,
Intel Graphics Development, Kevin Hilman, linux-amlogic,
linux-arm-kernel
It's right above the drm_dev_put().
Aside: This driver gets its devm_ stuff all wrong wrt drm_device and
anything hanging off that. Not the only one unfortunately.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
---
drivers/gpu/drm/meson/meson_drv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index b5f5eb7b4bb9..ae94d14ab7bc 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -284,7 +284,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
/* Remove early framebuffers (ie. simplefb) */
meson_remove_framebuffers();
- drm_mode_config_init(drm);
+ ret = drm_mode_config_init(drm);
+ if (ret)
+ goto free_drm;
drm->mode_config.max_width = 3840;
drm->mode_config.max_height = 2160;
drm->mode_config.funcs = &meson_mode_config_funcs;
@@ -379,7 +381,6 @@ static void meson_drv_unbind(struct device *dev)
drm_dev_unregister(drm);
drm_irq_uninstall(drm);
drm_kms_helper_poll_fini(drm);
- drm_mode_config_cleanup(drm);
drm_dev_put(drm);
}
--
2.24.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 35/52] drm/meson: Drop explicit drm_mode_config_cleanup call
2020-02-19 10:21 ` [PATCH 35/52] drm/meson: Drop explicit drm_mode_config_cleanup call Daniel Vetter
@ 2020-02-19 10:39 ` Neil Armstrong
0 siblings, 0 replies; 2+ messages in thread
From: Neil Armstrong @ 2020-02-19 10:39 UTC (permalink / raw)
To: Daniel Vetter, DRI Development
Cc: Daniel Vetter, Intel Graphics Development, linux-amlogic,
linux-arm-kernel, Kevin Hilman
On 19/02/2020 11:21, Daniel Vetter wrote:
> It's right above the drm_dev_put().
>
> Aside: This driver gets its devm_ stuff all wrong wrt drm_device and
> anything hanging off that. Not the only one unfortunately.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-arm-kernel@lists.infradead.org
> ---
> drivers/gpu/drm/meson/meson_drv.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index b5f5eb7b4bb9..ae94d14ab7bc 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -284,7 +284,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
> /* Remove early framebuffers (ie. simplefb) */
> meson_remove_framebuffers();
>
> - drm_mode_config_init(drm);
> + ret = drm_mode_config_init(drm);
> + if (ret)
> + goto free_drm;
> drm->mode_config.max_width = 3840;
> drm->mode_config.max_height = 2160;
> drm->mode_config.funcs = &meson_mode_config_funcs;
> @@ -379,7 +381,6 @@ static void meson_drv_unbind(struct device *dev)
> drm_dev_unregister(drm);
> drm_irq_uninstall(drm);
> drm_kms_helper_poll_fini(drm);
> - drm_mode_config_cleanup(drm);
> drm_dev_put(drm);
> }
>
>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-19 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200219102122.1607365-1-daniel.vetter@ffwll.ch>
2020-02-19 10:21 ` [PATCH 35/52] drm/meson: Drop explicit drm_mode_config_cleanup call Daniel Vetter
2020-02-19 10:39 ` Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®