From: Rui Miguel Silva Date: Thu, 3 Dec 2015 16:07:48 +0000 (+0000) Subject: greybus: lights: avoid channel torch double free X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d644181fe60f4fcfca7e9e9e9b0503993e391e69;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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;