From: Cornelia Huck <[email protected]>
Check for return value of add_class_attrs() in class_register().
Signed-off-by: Cornelia Huck <[email protected]>
class.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.18-rc6/drivers/base/class.c 2006-09-12 16:19:43.000000000 +0200
+++ linux-2.6.18-rc6+CH/drivers/base/class.c 2006-09-12 17:01:12.000000000 +0200
@@ -153,6 +153,8 @@ int class_register(struct class * cls)
error = subsystem_register(&cls->subsys);
if (!error) {
error = add_class_attrs(class_get(cls));
+ if (error)
+ subsystem_unregister(&cls->subsys);
class_put(cls);
}
return error;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]