From 63e8a14b1f9107ee2b51205385695be43ca40d5e Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Wed, 21 Oct 2015 15:26:44 +0530 Subject: [PATCH] greybus: interface: fix double freeing of interface structure The interface will be released by gb_interface_release() once all references for the interface are dropped. And so there is no need to free it in the error path specially. Reviewed-by: Johan Hovold Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/interface.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index 64bf91a..5d238d3 100644 --- a/drivers/staging/greybus/interface.c +++ b/drivers/staging/greybus/interface.c @@ -167,7 +167,6 @@ struct gb_interface *gb_interface_create(struct greybus_host_device *hd, free_intf: put_device(&intf->dev); - kfree(intf); put_module: put_device(&module->dev); return NULL; -- 2.7.4