mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3f85c787b7
commit
d644181fe6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user