lkml.org 
[lkml]   [2006]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[04/12] driver core fixes: retval check in class_register()
From: Cornelia Huck <cornelia.huck@de.ibm.com>

Check for return value of add_class_attrs() in class_register().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-09-13 18:43    [W:0.037 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site