summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-06-04 13:16:49 +1000
committerDave Airlie <airlied@redhat.com>2008-06-04 13:16:49 +1000
commit9f31bd09c1e748f72a30f6a0861cd72d93258992 (patch)
treef5b52f9203e25c35156dbd432f57c26d1e390524 /linux-core
parent8e4c61e52651c47f3d9fbbe5e80455baff0de2bb (diff)
drm/sysfs: don't try an unregister if not registered
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-core/drm_sysfs.c b/linux-core/drm_sysfs.c
index 01a3c047..c148256a 100644
--- a/linux-core/drm_sysfs.c
+++ b/linux-core/drm_sysfs.c
@@ -301,6 +301,9 @@ void drm_sysfs_connector_remove(struct drm_connector *connector)
{
int i;
+ if (!device_is_registered(&connector->kdev))
+ return;
+
DRM_DEBUG("removing \"%s\" from sysfs\n", drm_get_connector_name(connector));
for (i = 0; i < ARRAY_SIZE(connector_attrs); i++)
device_remove_file(&connector->kdev, &connector_attrs[i]);