From: Viresh Kumar Date: Wed, 21 Oct 2015 09:56:44 +0000 (+0530) Subject: greybus: interface: fix double freeing of interface structure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=63e8a14b1f9107ee2b51205385695be43ca40d5e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c index 64bf91ab0fb0..5d238d3e907b 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;