mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 07:08:21 -04:00
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:
committed by
Greg Kroah-Hartman
parent
249e7343c4
commit
54794d196b
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user