drm/vmwgfx/vmwgfx_drv: Fix an error path in vmw_setup_pci_resources()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Jan 2021 08:45:37 +0000 (11:45 +0300)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 9 Feb 2021 16:14:11 +0000 (17:14 +0100)
commit78e4ba40f1c1693d2c839e99130cba420454bc57
treeb0fdd589bd696baf2633e45bc8552ba7209689e7
parent6ff92deff711e6e5f8161c4934320d18d609edf8
drm/vmwgfx/vmwgfx_drv: Fix an error path in vmw_setup_pci_resources()

The devm_memremap() function never returns NULL, it returns error
pointers so the test needs to be fixed.  Also we need to call
pci_release_regions() to avoid a memory leak.

Fixes: be4f77ac6884 ("drm/vmwgfx: Cleanup fifo mmio handling")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/YA6FMboLhnE3uSvb@mwanda
(cherry picked from commit f3ebd4e6b692ab7af464561410a1f05dfc850823)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c