diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-10-21 15:26:45 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-10-21 16:17:05 -0700 |
commit | f7d3ad9828eba01ed2f5ccc1a12b8b1362ed02b4 (patch) | |
tree | 15b85055ca549462c52de87596f9298cd38efb87 /drivers/staging/greybus/module.c | |
parent | 63e8a14b1f9107ee2b51205385695be43ca40d5e (diff) | |
download | linux-f7d3ad9828eba01ed2f5ccc1a12b8b1362ed02b4.tar.gz linux-f7d3ad9828eba01ed2f5ccc1a12b8b1362ed02b4.tar.bz2 linux-f7d3ad9828eba01ed2f5ccc1a12b8b1362ed02b4.zip |
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 <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/module.c')
-rw-r--r-- | drivers/staging/greybus/module.c | 1 |
1 files changed, 0 insertions, 1 deletions
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; } |