提交 f7d3ad98 编写于 作者: V Viresh Kumar 提交者: Greg Kroah-Hartman

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: NJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
上级 63e8a14b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册