summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-04-26 23:04:22 +0000
committerEric Anholt <anholt@freebsd.org>2003-04-26 23:04:22 +0000
commita172ee2a18b715a6de9b8e914aecd8414a4f3b2d (patch)
treeb53bf53702ba97eb2fa2d914dd83a60c572a8cac /bsd-core
parentce514e08aa8fdbdf52da2ac2cbdace68e0b25210 (diff)
MFL: Don't install irq handler unless the driver has been initialized.
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drm_dma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bsd-core/drm_dma.c b/bsd-core/drm_dma.c
index 526faee2..10c26e37 100644
--- a/bsd-core/drm_dma.c
+++ b/bsd-core/drm_dma.c
@@ -160,6 +160,9 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
if ( !irq )
return DRM_ERR(EINVAL);
+ if (dev->dev_private == NULL)
+ return DRM_ERR(EINVAL);
+
DRM_LOCK;
if ( dev->irq ) {
DRM_UNLOCK;