summaryrefslogtreecommitdiff
path: root/linux-core/drm_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_dma.c')
-rw-r--r--linux-core/drm_dma.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-core/drm_dma.c b/linux-core/drm_dma.c
index 7c1785b4..34ab5322 100644
--- a/linux-core/drm_dma.c
+++ b/linux-core/drm_dma.c
@@ -194,6 +194,13 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
return -EINVAL;
down( &dev->struct_sem );
+
+ /* Driver must have been initialized */
+ if ( !dev->dev_private ) {
+ up( &dev->struct_sem );
+ return -EINVAL;
+ }
+
if ( dev->irq ) {
up( &dev->struct_sem );
return -EBUSY;