From: Mark Hounschell Date: Tue, 4 Mar 2014 21:03:07 +0000 (-0500) Subject: staging: dgap: Don't remove sysfs group we failed to create X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=54794d196b7b1d89dd933ab6d745f1870a0daa2d;p=linux-beck.git 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 --- 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);