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

Joonyoung Shim jy0922.shim at samsung.com
Wed Aug 3 22:41:00 PDT 2011


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 at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
---
 drivers/gpu/drm/drm_irq.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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;
-- 
1.7.1



More information about the dri-devel mailing list