drm/vmwgfx: Fix some memory leaks on errors
authorZack Rusin <zackr@vmware.com>
Thu, 28 Jan 2021 17:35:22 +0000 (12:35 -0500)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 9 Feb 2021 16:16:57 +0000 (17:16 +0100)
commitbb0ea196390590accde0674ff1475c2b5a283628
tree60e4ca3ab0d2cb5c51ba289ec57e8ae57e71f5ce
parent439dde0a96f0d7a396f342a3918a0af28d9b5541
drm/vmwgfx: Fix some memory leaks on errors

Dan noticed some issues with pci_release_region, this builds upon
that and fixes some other lingering issues. As part of this we
also can stop trying to manually free our managed device;
there's no need for it, it will be cleaned up automatically for us.

Fixes: 8772c0bb58bb ("drm/vmwgfx: Cleanup pci resource allocation")
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210128173756.121525-1-zackr@vmware.com
(cherry picked from commit 75ec69c79ebcae0ad16baf2249e378f5b02bdc12)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c