Commit 001f2cdb authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by Helge Deller

fbdev: vermilion: decrease reference count in error path

pci_get_device() will increase the reference count for the returned
pci_dev. For the error path, we need to use pci_dev_put() to decrease
the reference count.

Fixes: dbe7e429 ("vmlfb: framebuffer driver for Intel Vermilion Range")
Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b76449ee
......@@ -278,8 +278,10 @@ static int vmlfb_get_gpu(struct vml_par *par)
mutex_unlock(&vml_mutex);
if (pci_enable_device(par->gpu) < 0)
if (pci_enable_device(par->gpu) < 0) {
pci_dev_put(par->gpu);
return -ENODEV;
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment