From 54794d196b7b1d89dd933ab6d745f1870a0daa2d Mon Sep 17 00:00:00 2001 From: Mark Hounschell Date: Tue, 4 Mar 2014 16:03:07 -0500 Subject: [PATCH] staging: dgap: Don't remove sysfs group we failed to create We should not remove a sysfs group we failed to create Signed-off-by: Mark Hounschell Signed-off-by: Greg Kroah-Hartman --- 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 5dfce34794f1..85f85eb166e1 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); -- 2.30.2