* [PATCH] drm/vgem: add missing platform_device_unregister() in vgem_init()
@ 2020-08-10 12:59 Qinglang Miao
2020-08-10 13:12 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-08-10 12:59 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Greg Kroah-Hartman
Cc: dri-devel, linux-kernel, miaoqinglang
When vgem_init() get into out_put, the unregister call of
vgem_device->platform is missing. So add it before return.
Fixes: 363de9e7d4f6 "drm/vgem: Use drmm_add_final_kfree"
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index a775feda1..313339bbf 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -471,8 +471,8 @@ static int __init vgem_init(void)
out_put:
drm_dev_put(&vgem_device->drm);
+ platform_device_unregister(vgem_device->platform);
return ret;
-
out_unregister:
platform_device_unregister(vgem_device->platform);
out_free:
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/vgem: add missing platform_device_unregister() in vgem_init()
2020-08-10 12:59 [PATCH] drm/vgem: add missing platform_device_unregister() in vgem_init() Qinglang Miao
@ 2020-08-10 13:12 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2020-08-10 13:12 UTC (permalink / raw)
To: Qinglang Miao
Cc: David Airlie, Daniel Vetter, Greg Kroah-Hartman, dri-devel, linux-kernel
On Mon, Aug 10, 2020 at 08:59:42PM +0800, Qinglang Miao wrote:
> When vgem_init() get into out_put, the unregister call of
> vgem_device->platform is missing. So add it before return.
>
> Fixes: 363de9e7d4f6 "drm/vgem: Use drmm_add_final_kfree"
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Uh right I still have my series stuck which would have fixed this properly
... Thanks for your fix, both applied to drm-misc-next.
-Daniel
> ---
> drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> index a775feda1..313339bbf 100644
> --- a/drivers/gpu/drm/vgem/vgem_drv.c
> +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> @@ -471,8 +471,8 @@ static int __init vgem_init(void)
>
> out_put:
> drm_dev_put(&vgem_device->drm);
> + platform_device_unregister(vgem_device->platform);
> return ret;
> -
> out_unregister:
> platform_device_unregister(vgem_device->platform);
> out_free:
> --
> 2.25.1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-10 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 12:59 [PATCH] drm/vgem: add missing platform_device_unregister() in vgem_init() Qinglang Miao
2020-08-10 13:12 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).