Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;