summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-11-03 09:46:07 +1000
committerDave Airlie <airlied@redhat.com>2008-11-03 09:46:07 +1000
commitce2cd141c36f330da7e9fb9a281e51abab88e0d1 (patch)
treecf4509722b4de070f0434f067630234399b07b2a /linux-core
parent4ef8ace9a96bd6bb4040ef5c4c3ea5572d7129e1 (diff)
radeon: fix race in sysfs
Diffstat (limited to 'linux-core')
-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" :