From d644181fe60f4fcfca7e9e9e9b0503993e391e69 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva Date: Thu, 3 Dec 2015 16:07:48 +0000 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/light.c | 3 --- 1 file changed, 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; -- 2.30.2