summaryrefslogtreecommitdiff
path: root/bsd
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
parentce514e08aa8fdbdf52da2ac2cbdace68e0b25210 (diff)
MFL: Don't install irq handler unless the driver has been initialized.
Diffstat (limited to 'bsd')
-rw-r--r--bsd/drm_dma.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bsd/drm_dma.h b/bsd/drm_dma.h
index 526faee2..10c26e37 100644
--- a/bsd/drm_dma.h
+++ b/bsd/drm_dma.h
@@ -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;