Commit 3c4f858a authored by Linus Torvalds's avatar Linus Torvalds

DRI CVS merge: make sure the device is properly initialized

before opening it.
parent e648c81b
...@@ -193,6 +193,13 @@ int DRM(irq_install)( drm_device_t *dev, int irq ) ...@@ -193,6 +193,13 @@ int DRM(irq_install)( drm_device_t *dev, int irq )
return -EINVAL; return -EINVAL;
down( &dev->struct_sem ); down( &dev->struct_sem );
/* Driver must have been initialized */
if ( !dev->dev_private ) {
up( &dev->struct_sem );
return -EINVAL;
}
if ( dev->irq ) { if ( dev->irq ) {
up( &dev->struct_sem ); up( &dev->struct_sem );
return -EBUSY; return -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment