Skip to content

Commit

Permalink
drm/vkms: add missing platform_device_unregister() in vkms_init()
Browse files Browse the repository at this point in the history
[ Upstream commit 7995bd1 ]

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

Fixes: ac19f14 ("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>
  • Loading branch information
Qinglang Miao authored and gregkh committed Oct 29, 2020
1 parent 1439fb7 commit ad52e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vkms/vkms_drv.c
Expand Up @@ -190,8 +190,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:
Expand Down

0 comments on commit ad52e20

Please sign in to comment.