Messages in this thread Patch in this message | | | Date | Wed, 13 Sep 2006 18:38:42 +0200 | From | Cornelia Huck <> | 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/
| |