diff options
author | Eric Anholt <anholt@freebsd.org> | 2003-04-26 23:04:22 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2003-04-26 23:04:22 +0000 |
commit | a172ee2a18b715a6de9b8e914aecd8414a4f3b2d (patch) | |
tree | b53bf53702ba97eb2fa2d914dd83a60c572a8cac | |
parent | ce514e08aa8fdbdf52da2ac2cbdace68e0b25210 (diff) |
MFL: Don't install irq handler unless the driver has been initialized.
-rw-r--r-- | bsd-core/drm_dma.c | 3 | ||||
-rw-r--r-- | bsd/drm_dma.h | 3 |
2 files changed, 6 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; 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; |