Commit e1c44acc authored by Joonyoung Shim's avatar Joonyoung Shim Committed by Dave Airlie

drm: Fix irq install error handling

The registered irq should be unregistered by free_irq() if
irq_postinstall() returns the error after request_irq() is called
successfully.

[airlied: add vga switcheroo disable]
Signed-off-by: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 816985d4
......@@ -368,6 +368,9 @@ int drm_irq_install(struct drm_device *dev)
mutex_lock(&dev->struct_mutex);
dev->irq_enabled = 0;
mutex_unlock(&dev->struct_mutex);
if (!drm_core_check_feature(dev, DRIVER_MODESET))
vga_client_register(dev->pdev, NULL, NULL, NULL);
free_irq(drm_dev_to_irq(dev), dev);
}
return ret;
......
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