diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-19 12:56:12 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-01-19 12:56:12 +0300 |
commit | 6f84981772535e670e4e2df051a672af229b6694 (patch) | |
tree | 407cec2ba38b75fc2a1bdefae5b6d3c6405be435 /samples/vfio-mdev/mdpy-fb.c | |
parent | cba83c1fc38612c3d2c7b1bfed9d882e4848fb0d (diff) | |
parent | 0b45ac1170ea6416bc1d36798414c04870cd356d (diff) | |
download | linux-6f84981772535e670e4e2df051a672af229b6694.tar.xz |
Merge drm/drm-next into drm-misc-next
Backmerging into drm-misc-next to get DRM accelerator infrastructure,
which is required by ipuv driver.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'samples/vfio-mdev/mdpy-fb.c')
-rw-r--r-- | samples/vfio-mdev/mdpy-fb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c index 1de5801cd2e8..3c8001b9e407 100644 --- a/samples/vfio-mdev/mdpy-fb.c +++ b/samples/vfio-mdev/mdpy-fb.c @@ -109,7 +109,7 @@ static int mdpy_fb_probe(struct pci_dev *pdev, ret = pci_request_regions(pdev, "mdpy-fb"); if (ret < 0) - return ret; + goto err_disable_dev; pci_read_config_dword(pdev, MDPY_FORMAT_OFFSET, &format); pci_read_config_dword(pdev, MDPY_WIDTH_OFFSET, &width); @@ -183,6 +183,9 @@ err_release_fb: err_release_regions: pci_release_regions(pdev); +err_disable_dev: + pci_disable_device(pdev); + return ret; } @@ -191,7 +194,10 @@ static void mdpy_fb_remove(struct pci_dev *pdev) struct fb_info *info = pci_get_drvdata(pdev); unregister_framebuffer(info); + iounmap(info->screen_base); framebuffer_release(info); + pci_release_regions(pdev); + pci_disable_device(pdev); } static struct pci_device_id mdpy_fb_pci_table[] = { |