Commit b97c46ec authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: interface: free resources properly on failures

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 0a68a16b
......@@ -79,6 +79,7 @@ gb_interface_create(struct gb_module *gmod, u8 interface_id)
if (retval) {
pr_err("failed to add interface device for id 0x%02hhx\n",
interface_id);
put_device(&interface->dev);
kfree(interface);
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment