提交 eb6944f2 编写于 作者: T Thierry Reding 提交者: Daniel Vetter

vgaarb: Stop complaining about absent devices

Some setups do not register a default VGA device, in which case the VGA
arbiter will still complain about the (non-existent) PCI device being a
non-VGA device.

Fix this by making the error message conditional on a default VGA device
having been set up. Note that the easy route of erroring out early isn't
going to work because otherwise priv->target won't be properly updated.
Signed-off-by: NThierry Reding <treding@nvidia.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 84524917
...@@ -1091,8 +1091,11 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf, ...@@ -1091,8 +1091,11 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
vgadev = vgadev_find(pdev); vgadev = vgadev_find(pdev);
pr_debug("vgaarb: vgadev %p\n", vgadev); pr_debug("vgaarb: vgadev %p\n", vgadev);
if (vgadev == NULL) { if (vgadev == NULL) {
if (pdev) {
pr_err("vgaarb: this pci device is not a vga device\n"); pr_err("vgaarb: this pci device is not a vga device\n");
pci_dev_put(pdev); pci_dev_put(pdev);
}
ret_val = -ENODEV; ret_val = -ENODEV;
goto done; goto done;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册