Subject: [PATCH 2/3] driver core: add missing symlinks error handling

Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
Cc: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
drivers/base/core.c |    4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Index: 2.6-mm/drivers/base/core.c
===================================================================
--- 2.6-mm.orig/drivers/base/core.c
+++ 2.6-mm/drivers/base/core.c
@@ -649,8 +649,10 @@ int device_add(struct device *dev)
                                             BUS_NOTIFY_DEL_DEVICE, dev);
        device_remove_groups(dev);
 GroupError:
-       device_remove_attrs(dev);
+       device_remove_attrs(dev);
 AttrsError:
+       device_remove_links(dev, parent);
+
        if (dev->devt_attr) {
                device_remove_file(dev, dev->devt_attr);
                kfree(dev->devt_attr);
-
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/

Reply via email to