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

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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);