Commit 8d1043a3 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman
Browse files

greybus: bundle: fix double freeing of bundle structure



The bundle will be released by gb_bundle_release() once all references
for the bundle are dropped. And so there is no need to free it in the
error path specially.

Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 3014712f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -184,7 +184,6 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
		pr_err("failed to add bundle device for id 0x%02hhx\n",
			bundle_id);
		put_device(&bundle->dev);
		kfree(bundle);
		return NULL;
	}