]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/vkms: add missing platform_device_unregister() in vkms_init()
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 10 Aug 2020 13:00:11 +0000 (21:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:27 +0000 (10:07 +0100)
[ Upstream commit 7995bd13296111d672d8c5959f5e81dbbbda5286 ]

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

Fixes: ac19f140bc27 ("drm/vkms: Use drmm_add_final_kfree")
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200810130011.187691-1-miaoqinglang@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vkms/vkms_drv.c

index 1e8b2169d834123810e74d3a628118324d28e2bf..e6a3ea1b399a7c53df5c2bbbbd59db7c1087bd54 100644 (file)
@@ -188,8 +188,8 @@ static int __init vkms_init(void)
 
 out_put:
        drm_dev_put(&vkms_device->drm);
+       platform_device_unregister(vkms_device->platform);
        return ret;
-
 out_unregister:
        platform_device_unregister(vkms_device->platform);
 out_free: