diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-05 09:57:19 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-09-05 09:57:19 +0400 |
commit | e6c340171f0daaccc95b90abbeed2b837157ee11 (patch) | |
tree | 843d4035be59bd791321910e52157ce527b3b4b3 /drivers/gpu/drm/drm_sysfs.c | |
parent | a85442ade272121927a56e02f7dfde1127482df2 (diff) | |
parent | 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d (diff) | |
download | linux-e6c340171f0daaccc95b90abbeed2b837157ee11.tar.xz |
Merge tag 'v3.6-rc4' into next
Linux 3.6-rc4
# gpg: Signature made Sat 01 Sep 2012 10:40:33 AM PDT using RSA key ID 00411886
# gpg: Good signature from "Linus Torvalds <torvalds@linux-foundation.org>"
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r-- | drivers/gpu/drm/drm_sysfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 45cf1dd3eb9c..45ac8d6c92b7 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -134,6 +134,7 @@ void drm_sysfs_destroy(void) return; class_remove_file(drm_class, &class_attr_version.attr); class_destroy(drm_class); + drm_class = NULL; } /** @@ -554,6 +555,9 @@ void drm_sysfs_device_remove(struct drm_minor *minor) int drm_class_device_register(struct device *dev) { + if (!drm_class || IS_ERR(drm_class)) + return -ENOENT; + dev->class = drm_class; return device_register(dev); } |