Commit 57fb5408 authored by Qinglang Miao's avatar Qinglang Miao Committed by Daniel Vetter

drm/vgem: add missing platform_device_unregister() in vgem_init()

When vgem_init() get into out_put, the unregister call of
vgem_device->platform is missing. So add it before return.

Fixes: 363de9e7 ("drm/vgem: Use drmm_add_final_kfree")
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200810125942.186637-1-miaoqinglang@huawei.com
parent 5bd858d7
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment