diff mbox

[1/2] drm: Fix irq install error handling

Message ID 1312436461-7972-1-git-send-email-jy0922.shim@samsung.com (mailing list archive)
State Accepted
Headers show

Commit Message

Joonyoung Shim Aug. 4, 2011, 5:41 a.m. UTC
The registered irq should be unregistered by free_irq() if
irq_postinstall() returns the error after request_irq() is called
successfully.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/drm_irq.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 2022a5c..7497c89 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -368,6 +368,7 @@  int drm_irq_install(struct drm_device *dev)
 		mutex_lock(&dev->struct_mutex);
 		dev->irq_enabled = 0;
 		mutex_unlock(&dev->struct_mutex);
+		free_irq(drm_dev_to_irq(dev), dev);
 	}
 
 	return ret;