MFL: Don't install irq handler unless the driver has been initialized.
authorEric Anholt <anholt@freebsd.org>
Sat, 26 Apr 2003 23:04:22 +0000 (23:04 +0000)
committerEric Anholt <anholt@freebsd.org>
Sat, 26 Apr 2003 23:04:22 +0000 (23:04 +0000)
bsd-core/drm_dma.c
bsd/drm_dma.h

index 526faee..10c26e3 100644 (file)
@@ -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;
index 526faee..10c26e3 100644 (file)
@@ -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;