[PATCH] firmware/dcdbas: fix bug in error cleanup

From: Jeff Garzik
Date: Tue Oct 10 2006 - 02:58:31 EST



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@xxxxxxxxxx>

---

drivers/firmware/dcdbas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

36ed9d7acc1c6df0c9f1083e1df729631339a3d8
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index 339f405..8bcb58c 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -559,7 +559,7 @@ static int __devinit dcdbas_probe(struct
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;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/