drm/bochs: Fix missing pci_disable_device() on error in bochs_pci_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 15 Jul 2021 13:28:45 +0000 (21:28 +0800)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 20 Jul 2021 09:19:57 +0000 (11:19 +0200)
Replace pci_enable_device() with pcim_enable_device(),
pci_disable_device() will be called in release automatically.

v3:
  reformat commit message
  update for move to tiny/
v2:
  use pcim_enable_device()

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reported-by: Hulk Robot <hulkci@huawei.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210715132845.2415619-1-yangyingliang@huawei.com
drivers/gpu/drm/tiny/bochs.c

index a2cfecfa8556fbdc77685c35e4f8350a6120dffb..73415fa9ae0f5222cd891c9f3388cadbb280f918 100644 (file)
@@ -648,7 +648,7 @@ static int bochs_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent
        if (IS_ERR(dev))
                return PTR_ERR(dev);
 
-       ret = pci_enable_device(pdev);
+       ret = pcim_enable_device(pdev);
        if (ret)
                goto err_free_dev;