diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2011-08-04 01:41:00 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-08-04 09:39:09 -0400 |
commit | e1c44acc8cabda6b38864f25e809b306c4d2d790 (patch) | |
tree | 42c6c31cf5e264e161e1d213b683c7ccceb09a98 /drivers/gpu | |
parent | 816985d4f96cda5159b6b65f3442964725030ae9 (diff) |
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: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 2022a5c966bb..9be574fbcc2f 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c | |||
@@ -368,6 +368,9 @@ int drm_irq_install(struct drm_device *dev) | |||
368 | mutex_lock(&dev->struct_mutex); | 368 | mutex_lock(&dev->struct_mutex); |
369 | dev->irq_enabled = 0; | 369 | dev->irq_enabled = 0; |
370 | mutex_unlock(&dev->struct_mutex); | 370 | mutex_unlock(&dev->struct_mutex); |
371 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | ||
372 | vga_client_register(dev->pdev, NULL, NULL, NULL); | ||
373 | free_irq(drm_dev_to_irq(dev), dev); | ||
371 | } | 374 | } |
372 | 375 | ||
373 | return ret; | 376 | return ret; |