diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2015-12-03 16:07:48 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-12-03 15:33:34 -0800 |
commit | d644181fe60f4fcfca7e9e9e9b0503993e391e69 (patch) | |
tree | 9e5e4e374dfe24f240b189ca5e40be29101faa67 /drivers/staging/greybus/light.c | |
parent | 3f85c787b74c26f3816017e64288af907f291462 (diff) |
greybus: lights: avoid channel torch double free
When attaching torch to a flash we release the channel torch resources,
but afterwards we do it again when releasing all the channels.
Just free all the resource at channel release.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/light.c')
-rw-r--r-- | drivers/staging/greybus/light.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c index 01dcf18c9601..c49cc7ea4b28 100644 --- a/drivers/staging/greybus/light.c +++ b/drivers/staging/greybus/light.c @@ -681,9 +681,6 @@ static int __gb_lights_channel_torch_attach(struct gb_channel *channel, kfree(channel->led->name); channel->led->name = name; - /* free original torch channel resources */ - gb_lights_channel_free(channel_torch); - channel_torch->led = channel->led; return 0; |