From: Viresh Kumar Date: Wed, 21 Oct 2015 09:56:45 +0000 (+0530) Subject: greybus: module: fix double freeing of module structure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7d3ad9828eba01ed2f5ccc1a12b8b1362ed02b4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git greybus: module: fix double freeing of module structure The module will be released by gb_module_release() once all references for the module 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/module.c b/drivers/staging/greybus/module.c index d7706544f3be..43e8bab91caf 100644 --- a/drivers/staging/greybus/module.c +++ b/drivers/staging/greybus/module.c @@ -151,7 +151,6 @@ struct gb_module *gb_module_create(struct device *parent, u8 module_id) pr_err("failed to add module device for id 0x%02hhx\n", module_id); put_device(&module->dev); - kfree(module); return NULL; }