diff options
-rw-r--r-- | drivers/base/class.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index b32b77ff2dcd..0ff267a248db 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -562,7 +562,10 @@ int class_device_add(struct class_device *class_dev) | |||
562 | goto out2; | 562 | goto out2; |
563 | 563 | ||
564 | /* add the needed attributes to this device */ | 564 | /* add the needed attributes to this device */ |
565 | sysfs_create_link(&class_dev->kobj, &parent_class->subsys.kset.kobj, "subsystem"); | 565 | error = sysfs_create_link(&class_dev->kobj, |
566 | &parent_class->subsys.kset.kobj, "subsystem"); | ||
567 | if (error) | ||
568 | goto out3; | ||
566 | class_dev->uevent_attr.attr.name = "uevent"; | 569 | class_dev->uevent_attr.attr.name = "uevent"; |
567 | class_dev->uevent_attr.attr.mode = S_IWUSR; | 570 | class_dev->uevent_attr.attr.mode = S_IWUSR; |
568 | class_dev->uevent_attr.attr.owner = parent_class->owner; | 571 | class_dev->uevent_attr.attr.owner = parent_class->owner; |