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:
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue