[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1604315990-56787-1-git-send-email-tiantao6@hisilicon.com>
Date: Mon, 2 Nov 2020 19:19:50 +0800
From: Tian Tao <tiantao6@...ilicon.com>
To: <maarten.lankhorst@...ux.intel.com>, <mripard@...nel.org>,
<tzimmermann@...e.de>, <airlied@...ux.ie>, <daniel@...ll.ch>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/irq: Add irq as false detection
Add the detection of false for irq, so that the EINVAL is not
returned when dev->irq_enabled is false.
Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
---
drivers/gpu/drm/drm_irq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 09d6e9e..7537a3d 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -172,6 +172,9 @@ int drm_irq_uninstall(struct drm_device *dev)
bool irq_enabled;
int i;
+ if (!dev->irq_enabled || !dev)
+ return 0;
+
irq_enabled = dev->irq_enabled;
dev->irq_enabled = false;
--
2.7.4
Powered by blists - more mailing lists