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 <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Mark Hounschell 2014-03-04 16:03:07 -05:00 committed by Greg Kroah-Hartman
parent 249e7343c4
commit 54794d196b
1 changed files with 1 additions and 3 deletions

View File

@ -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);