Commit 54794d19 authored by Mark Hounschell's avatar Mark Hounschell Committed by Greg Kroah-Hartman

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: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 249e7343
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment