Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 097b8f62 authored by Arvind Yadav's avatar Arvind Yadav Committed by Jiri Kosina
Browse files

HID: wacom: Release device resource data obtained by devres_alloc()



Free device resource data, if __wacom_devm_sysfs_create_group
is not successful.

Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent a230cd52
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1213,8 +1213,10 @@ static int __wacom_devm_sysfs_create_group(struct wacom *wacom,
	devres->root = root;

	error = sysfs_create_group(devres->root, group);
	if (error)
	if (error) {
		devres_free(devres);
		return error;
	}

	devres_add(&wacom->hdev->dev, devres);