summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsd-core/drm_dma.c3
-rw-r--r--bsd/drm_dma.h3
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;