summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/radeon_drv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c
index 3bc0c057..f7881720 100644
--- a/linux-core/radeon_drv.c
+++ b/linux-core/radeon_drv.c
@@ -60,8 +60,12 @@ module_param_named(agpmode, radeon_agpmode, int, 0444);
static int dri_library_name(struct drm_device * dev, char * buf)
{
drm_radeon_private_t *dev_priv = dev->dev_private;
- int family = dev_priv->flags & RADEON_FAMILY_MASK;
+ int family;
+ if (!dev_priv)
+ return 0;
+
+ family = dev_priv->flags & RADEON_FAMILY_MASK;
return snprintf(buf, PAGE_SIZE, "%s\n",
(family < CHIP_R200) ? "radeon" :
((family < CHIP_R300) ? "r200" :