[PATCH 01/06] staging: dgap: Don't remove sysfs group we failed to create
Mark Hounschell
markh at compro.net
Tue Mar 4 21:03:07 UTC 2014
We should not remove a sysfs group we failed to create
Signed-off-by: Mark Hounschell <markh at compro.net>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
drivers/staging/dgap/dgap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 5dfce34..85f85eb 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -6686,10 +6686,8 @@ static void dgap_create_tty_sysfs(struct un_t *un, struct device *c)
int ret;
ret = sysfs_create_group(&c->kobj, &dgap_tty_attribute_group);
- if (ret) {
- sysfs_remove_group(&c->kobj, &dgap_tty_attribute_group);
+ if (ret)
return;
- }
dev_set_drvdata(c, un);
--
1.8.1.4
More information about the devel
mailing list