summaryrefslogtreecommitdiffstats
path: root/drivers/base/class.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-18 17:50:16 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-18 17:50:16 -0700
commit65740356ccfa66703e7e0d47fbe372ba5193916b (patch)
treee1db48e0967a9499d20a343e27af50abb0b1c24b /drivers/base/class.c
parent6a13a857becef065cd138b67c162dc5c5dd88655 (diff)
parent4d664238207a82c4018757e2d87cf2a780462dcd (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: driver core: kmalloc() failure check in driver_probe_device Driver core: bus: remove indentation level Driver core: Don't ignore error returns from probing Driver core: Don't leak 'old_class_name' in drivers/base/core.c::device_rename() driver core fixes: sysfs_create_group() retval in topology.c driver core fixes: device_create_file() retval check in dmapool.c driver core fixes: device_add() cleanup on error driver core fixes: bus_add_device() cleanup on error driver core fixes: bus_add_attrs() retval check driver core fixes: sysfs_create_link() retval check in class.c sysfs: update obsolete comment in sysfs_update_file sysfs: remove duplicated dput in sysfs_update_file HOWTO: bug report addition Fix dev_printk() is now GPL-only Driver core: plug device probe memory leak Documentation: feature-removal-schedule typo
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r--drivers/base/class.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index b32b77ff2dc..0ff267a248d 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -562,7 +562,10 @@ int class_device_add(struct class_device *class_dev)
goto out2;
/* add the needed attributes to this device */
- sysfs_create_link(&class_dev->kobj, &parent_class->subsys.kset.kobj, "subsystem");
+ error = sysfs_create_link(&class_dev->kobj,
+ &parent_class->subsys.kset.kobj, "subsystem");
+ if (error)
+ goto out3;
class_dev->uevent_attr.attr.name = "uevent";
class_dev->uevent_attr.attr.mode = S_IWUSR;
class_dev->uevent_attr.attr.owner = parent_class->owner;