From: Viresh Kumar Date: Thu, 13 Nov 2014 12:44:38 +0000 (+0530) Subject: greybus: interface: free resources properly on failures X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b97c46ecaf27c815469f5f7e6a325f0cb53869fe;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: interface: free resources properly on failures Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index f7f9bfda4f9b..537ef80a599a 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -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; }