diff options
author | Dave Airlie <airlied@redhat.com> | 2008-06-04 13:16:49 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-06-04 13:16:49 +1000 |
commit | 9f31bd09c1e748f72a30f6a0861cd72d93258992 (patch) | |
tree | f5b52f9203e25c35156dbd432f57c26d1e390524 /linux-core/drm_sysfs.c | |
parent | 8e4c61e52651c47f3d9fbbe5e80455baff0de2bb (diff) |
drm/sysfs: don't try an unregister if not registered
Diffstat (limited to 'linux-core/drm_sysfs.c')
-rw-r--r-- | linux-core/drm_sysfs.c | 3 |
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]); |