[PATCH] firmware/dcdbas: fix bug in error cleanup
authorJeff Garzik <jeff@garzik.org>
Tue, 10 Oct 2006 06:58:14 +0000 (02:58 -0400)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Oct 2006 23:29:37 +0000 (16:29 -0700)
The error path path mistakenly called sysfs_create_group() rather than
sysfs_remove_group().  They take the same arguments, so it's easy to
cut-n-paste such a bug.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/firmware/dcdbas.c

index 339f405..8bcb58c 100644 (file)
@@ -559,7 +559,7 @@ static int __devinit dcdbas_probe(struct platform_device *dev)
                        while (--i >= 0)
                                sysfs_remove_bin_file(&dev->dev.kobj,
                                                      dcdbas_bin_attrs[i]);
-                       sysfs_create_group(&dev->dev.kobj, &dcdbas_attr_group);
+                       sysfs_remove_group(&dev->dev.kobj, &dcdbas_attr_group);
                        return error;
                }
        }