From b97c46ecaf27c815469f5f7e6a325f0cb53869fe Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 13 Nov 2014 18:14:38 +0530 Subject: [PATCH] greybus: interface: free resources properly on failures Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/interface.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.20.1