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

greybus: module: fix double freeing of module structure



The module will be released by gb_module_release() once all references
for the module 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 63e8a14b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ struct gb_module *gb_module_create(struct device *parent, u8 module_id)
		pr_err("failed to add module device for id 0x%02hhx\n",
			module_id);
		put_device(&module->dev);
		kfree(module);
		return NULL;
	}